home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / autose1g / frmgames.frm (.txt) < prev    next >
Visual Basic Form  |  1999-06-24  |  218KB  |  5,908 lines

  1. VERSION 5.00
  2. Begin VB.Form frmGameScreen 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   " 4000 A.D."
  6.    ClientHeight    =   6795
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   9480
  10.    Icon            =   "FRMGAMES.frx":0000
  11.    KeyPreview      =   -1  'True
  12.    LinkTopic       =   "Form1"
  13.    PaletteMode     =   1  'UseZOrder
  14.    ScaleHeight     =   6795
  15.    ScaleWidth      =   9480
  16.    WindowState     =   2  'Maximized
  17.    Begin VB.Timer tmrUpdateMessageBox 
  18.       Enabled         =   0   'False
  19.       Interval        =   3000
  20.       Left            =   1155
  21.       Top             =   390
  22.    End
  23.    Begin VB.PictureBox picNuclear 
  24.       Height          =   315
  25.       Left            =   1560
  26.       Picture         =   "FRMGAMES.frx":08CA
  27.       ScaleHeight     =   255
  28.       ScaleWidth      =   255
  29.       TabIndex        =   135
  30.       Top             =   1035
  31.       Visible         =   0   'False
  32.       Width           =   315
  33.    End
  34.    Begin VB.PictureBox picPlanet5 
  35.       Height          =   285
  36.       Left            =   465
  37.       Picture         =   "FRMGAMES.frx":09C4
  38.       ScaleHeight     =   225
  39.       ScaleWidth      =   195
  40.       TabIndex        =   134
  41.       Top             =   480
  42.       Visible         =   0   'False
  43.       Width           =   255
  44.    End
  45.    Begin VB.PictureBox picPlanet4 
  46.       Height          =   285
  47.       Left            =   45
  48.       Picture         =   "FRMGAMES.frx":0EE6
  49.       ScaleHeight     =   225
  50.       ScaleWidth      =   195
  51.       TabIndex        =   133
  52.       Top             =   465
  53.       Visible         =   0   'False
  54.       Width           =   255
  55.    End
  56.    Begin VB.PictureBox picPlanet3 
  57.       Height          =   285
  58.       Left            =   735
  59.       Picture         =   "FRMGAMES.frx":1418
  60.       ScaleHeight     =   225
  61.       ScaleWidth      =   195
  62.       TabIndex        =   132
  63.       Top             =   75
  64.       Visible         =   0   'False
  65.       Width           =   255
  66.    End
  67.    Begin VB.PictureBox picPlanet2 
  68.       Height          =   285
  69.       Left            =   405
  70.       Picture         =   "FRMGAMES.frx":194A
  71.       ScaleHeight     =   225
  72.       ScaleWidth      =   195
  73.       TabIndex        =   131
  74.       Top             =   60
  75.       Visible         =   0   'False
  76.       Width           =   255
  77.    End
  78.    Begin VB.PictureBox picPlanet1 
  79.       Height          =   270
  80.       Left            =   45
  81.       Picture         =   "FRMGAMES.frx":1E7C
  82.       ScaleHeight     =   210
  83.       ScaleWidth      =   165
  84.       TabIndex        =   130
  85.       Top             =   90
  86.       Visible         =   0   'False
  87.       Width           =   225
  88.    End
  89.    Begin VB.PictureBox picTiny 
  90.       Height          =   510
  91.       Left            =   -45
  92.       Picture         =   "FRMGAMES.frx":23AE
  93.       ScaleHeight     =   450
  94.       ScaleWidth      =   420
  95.       TabIndex        =   129
  96.       Top             =   1635
  97.       Visible         =   0   'False
  98.       Width           =   480
  99.    End
  100.    Begin VB.Frame fraLanding 
  101.       Caption         =   "Attack/Land Ships"
  102.       Enabled         =   0   'False
  103.       BeginProperty Font 
  104.          Name            =   "MS Sans Serif"
  105.          Size            =   8.25
  106.          Charset         =   0
  107.          Weight          =   700
  108.          Underline       =   0   'False
  109.          Italic          =   0   'False
  110.          Strikethrough   =   0   'False
  111.       EndProperty
  112.       Height          =   945
  113.       Left            =   7635
  114.       TabIndex        =   113
  115.       Top             =   5910
  116.       Width           =   1860
  117.       Begin VB.CommandButton cmdLandShip2 
  118.          Caption         =   "Ship 2"
  119.          Enabled         =   0   'False
  120.          Height          =   300
  121.          Left            =   180
  122.          TabIndex        =   115
  123.          Top             =   540
  124.          Width           =   1500
  125.       End
  126.       Begin VB.CommandButton cmdLandShip1 
  127.          Caption         =   "Ship 1"
  128.          Enabled         =   0   'False
  129.          Height          =   300
  130.          Left            =   180
  131.          TabIndex        =   114
  132.          Top             =   240
  133.          Width           =   1500
  134.       End
  135.    End
  136.    Begin VB.PictureBox picTemp 
  137.       BeginProperty Font 
  138.          Name            =   "MS Sans Serif"
  139.          Size            =   8.25
  140.          Charset         =   0
  141.          Weight          =   700
  142.          Underline       =   0   'False
  143.          Italic          =   0   'False
  144.          Strikethrough   =   0   'False
  145.       EndProperty
  146.       Height          =   525
  147.       Left            =   30
  148.       Picture         =   "FRMGAMES.frx":2C78
  149.       ScaleHeight     =   465
  150.       ScaleWidth      =   495
  151.       TabIndex        =   112
  152.       Top             =   990
  153.       Visible         =   0   'False
  154.       Width           =   555
  155.    End
  156.    Begin VB.TextBox txtPlayerName 
  157.       BackColor       =   &H00000000&
  158.       BeginProperty Font 
  159.          Name            =   "MS Sans Serif"
  160.          Size            =   8.25
  161.          Charset         =   0
  162.          Weight          =   700
  163.          Underline       =   0   'False
  164.          Italic          =   0   'False
  165.          Strikethrough   =   0   'False
  166.       EndProperty
  167.       ForeColor       =   &H0000FF00&
  168.       Height          =   330
  169.       Left            =   6105
  170.       TabIndex        =   84
  171.       Text            =   "Player 1"
  172.       Top             =   6480
  173.       Width           =   1485
  174.    End
  175.    Begin VB.TextBox txtTurnNumber 
  176.       BackColor       =   &H00000000&
  177.       BeginProperty Font 
  178.          Name            =   "MS Sans Serif"
  179.          Size            =   8.25
  180.          Charset         =   0
  181.          Weight          =   700
  182.          Underline       =   0   'False
  183.          Italic          =   0   'False
  184.          Strikethrough   =   0   'False
  185.       EndProperty
  186.       ForeColor       =   &H0000FF00&
  187.       Height          =   330
  188.       Left            =   5190
  189.       TabIndex        =   55
  190.       Text            =   "Turn "
  191.       Top             =   6480
  192.       Width           =   885
  193.    End
  194.    Begin VB.CommandButton cmdEndTurn 
  195.       Caption         =   "&Save Turn"
  196.       Height          =   330
  197.       Left            =   180
  198.       TabIndex        =   45
  199.       Top             =   5490
  200.       Width           =   1200
  201.    End
  202.    Begin VB.Frame fraUpgrade 
  203.       Caption         =   "Resource Mgmt"
  204.       Enabled         =   0   'False
  205.       BeginProperty Font 
  206.          Name            =   "MS Sans Serif"
  207.          Size            =   8.25
  208.          Charset         =   0
  209.          Weight          =   700
  210.          Underline       =   0   'False
  211.          Italic          =   0   'False
  212.          Strikethrough   =   0   'False
  213.       EndProperty
  214.       Height          =   5820
  215.       Left            =   7620
  216.       TabIndex        =   44
  217.       Top             =   30
  218.       Width           =   1875
  219.       Begin VB.CommandButton cmdRepairIndustry 
  220.          Caption         =   "Repair Industry"
  221.          Enabled         =   0   'False
  222.          Height          =   300
  223.          Left            =   180
  224.          TabIndex        =   138
  225.          Top             =   4830
  226.          Width           =   1500
  227.       End
  228.       Begin VB.CommandButton cmdCleanup 
  229.          Caption         =   "Detoxify Planet"
  230.          Enabled         =   0   'False
  231.          Height          =   300
  232.          Left            =   180
  233.          TabIndex        =   127
  234.          Top             =   5130
  235.          Width           =   1500
  236.       End
  237.       Begin VB.CommandButton cmdRegenerate 
  238.          Caption         =   "Regenerate Planet"
  239.          Enabled         =   0   'False
  240.          Height          =   300
  241.          Left            =   180
  242.          TabIndex        =   126
  243.          Top             =   5430
  244.          Width           =   1500
  245.       End
  246.       Begin VB.PictureBox picUpgrade 
  247.          BackColor       =   &H00C0C0C0&
  248.          Height          =   660
  249.          Index           =   7
  250.          Left            =   1230
  251.          Picture         =   "FRMGAMES.frx":3542
  252.          ScaleHeight     =   600
  253.          ScaleMode       =   0  'User
  254.          ScaleWidth      =   495
  255.          TabIndex        =   125
  256.          Top             =   1890
  257.          Width           =   555
  258.       End
  259.       Begin VB.PictureBox picUpgrade 
  260.          BackColor       =   &H00C0C0C0&
  261.          Height          =   645
  262.          Index           =   6
  263.          Left            =   1260
  264.          Picture         =   "FRMGAMES.frx":3FD8
  265.          ScaleHeight     =   585
  266.          ScaleMode       =   0  'User
  267.          ScaleWidth      =   465
  268.          TabIndex        =   124
  269.          Top             =   1215
  270.          Width           =   525
  271.       End
  272.       Begin VB.CommandButton cmdScan 
  273.          Caption         =   "Scanner"
  274.          Enabled         =   0   'False
  275.          Height          =   300
  276.          Left            =   180
  277.          TabIndex        =   123
  278.          Top             =   4530
  279.          Width           =   1500
  280.       End
  281.       Begin VB.CommandButton cmdPlanetName 
  282.          Height          =   270
  283.          Left            =   105
  284.          TabIndex        =   120
  285.          Top             =   210
  286.          Width           =   1665
  287.       End
  288.       Begin VB.Frame fraTactical 
  289.          BeginProperty Font 
  290.             Name            =   "MS Sans Serif"
  291.             Size            =   8.25
  292.             Charset         =   0
  293.             Weight          =   700
  294.             Underline       =   0   'False
  295.             Italic          =   0   'False
  296.             Strikethrough   =   0   'False
  297.          EndProperty
  298.          Height          =   825
  299.          Left            =   60
  300.          TabIndex        =   110
  301.          Top             =   3660
  302.          Width           =   1755
  303.          Begin VB.CommandButton cmdLaunchBioRocket 
  304.             Caption         =   "BioHazard Rocket"
  305.             Enabled         =   0   'False
  306.             Height          =   300
  307.             Left            =   120
  308.             TabIndex        =   128
  309.             Top             =   450
  310.             Width           =   1500
  311.          End
  312.          Begin VB.CommandButton cmdLaunch 
  313.             Caption         =   "&Launch Ship"
  314.             Enabled         =   0   'False
  315.             Height          =   300
  316.             Left            =   120
  317.             TabIndex        =   111
  318.             Top             =   150
  319.             Width           =   1500
  320.          End
  321.       End
  322.       Begin VB.CommandButton cmdOK 
  323.          Caption         =   "&OK"
  324.          Enabled         =   0   'False
  325.          Height          =   270
  326.          Left            =   450
  327.          TabIndex        =   90
  328.          Top             =   3375
  329.          Width           =   1050
  330.       End
  331.       Begin VB.TextBox txtTotal 
  332.          BackColor       =   &H00000000&
  333.          BeginProperty Font 
  334.             Name            =   "MS Sans Serif"
  335.             Size            =   8.25
  336.             Charset         =   0
  337.             Weight          =   700
  338.             Underline       =   0   'False
  339.             Italic          =   0   'False
  340.             Strikethrough   =   0   'False
  341.          EndProperty
  342.          ForeColor       =   &H0000FF00&
  343.          Height          =   285
  344.          Left            =   945
  345.          MultiLine       =   -1  'True
  346.          TabIndex        =   89
  347.          Top             =   3045
  348.          Width           =   555
  349.       End
  350.       Begin VB.HScrollBar hsbQuantity 
  351.          Enabled         =   0   'False
  352.          Height          =   240
  353.          LargeChange     =   2
  354.          Left            =   90
  355.          Max             =   50
  356.          TabIndex        =   86
  357.          Top             =   2760
  358.          Width           =   1425
  359.       End
  360.       Begin VB.PictureBox picUpgrade 
  361.          BackColor       =   &H00000000&
  362.          Height          =   660
  363.          Index           =   5
  364.          Left            =   105
  365.          Picture         =   "FRMGAMES.frx":493A
  366.          ScaleHeight     =   600
  367.          ScaleWidth      =   510
  368.          TabIndex        =   53
  369.          Top             =   1890
  370.          Width           =   570
  371.       End
  372.       Begin VB.PictureBox picUpgrade 
  373.          BackColor       =   &H00808080&
  374.          Height          =   645
  375.          Index           =   4
  376.          Left            =   690
  377.          Picture         =   "FRMGAMES.frx":4C44
  378.          ScaleHeight     =   585
  379.          ScaleWidth      =   480
  380.          TabIndex        =   52
  381.          Top             =   1215
  382.          Width           =   540
  383.       End
  384.       Begin VB.PictureBox picUpgrade 
  385.          Height          =   645
  386.          Index           =   3
  387.          Left            =   105
  388.          Picture         =   "FRMGAMES.frx":5D52
  389.          ScaleHeight     =   585
  390.          ScaleWidth      =   495
  391.          TabIndex        =   51
  392.          Top             =   1215
  393.          Width           =   555
  394.       End
  395.       Begin VB.PictureBox picUpgrade 
  396.          BackColor       =   &H00800080&
  397.          Height          =   675
  398.          Index           =   2
  399.          Left            =   1260
  400.          Picture         =   "FRMGAMES.frx":67D4
  401.          ScaleHeight     =   615
  402.          ScaleWidth      =   480
  403.          TabIndex        =   50
  404.          Top             =   525
  405.          Width           =   540
  406.       End
  407.       Begin VB.PictureBox picUpgrade 
  408.          Height          =   675
  409.          Index           =   1
  410.          Left            =   660
  411.          Picture         =   "FRMGAMES.frx":78E2
  412.          ScaleHeight     =   615
  413.          ScaleWidth      =   525
  414.          TabIndex        =   49
  415.          Top             =   525
  416.          Width           =   585
  417.       End
  418.       Begin VB.PictureBox picUpgrade 
  419.          Height          =   675
  420.          Index           =   0
  421.          Left            =   105
  422.          Picture         =   "FRMGAMES.frx":8330
  423.          ScaleHeight     =   615
  424.          ScaleWidth      =   480
  425.          TabIndex        =   48
  426.          Top             =   525
  427.          Width           =   540
  428.       End
  429.       Begin VB.Label lblTotal 
  430.          Caption         =   "Cost:"
  431.          BeginProperty Font 
  432.             Name            =   "MS Sans Serif"
  433.             Size            =   8.25
  434.             Charset         =   0
  435.             Weight          =   700
  436.             Underline       =   0   'False
  437.             Italic          =   0   'False
  438.             Strikethrough   =   0   'False
  439.          EndProperty
  440.          Height          =   225
  441.          Left            =   420
  442.          TabIndex        =   88
  443.          Top             =   3075
  444.          Width           =   480
  445.       End
  446.       Begin VB.Label lblQuantity 
  447.          BeginProperty Font 
  448.             Name            =   "MS Sans Serif"
  449.             Size            =   8.25
  450.             Charset         =   0
  451.             Weight          =   700
  452.             Underline       =   0   'False
  453.             Italic          =   0   'False
  454.             Strikethrough   =   0   'False
  455.          EndProperty
  456.          Height          =   225
  457.          Left            =   1530
  458.          TabIndex        =   87
  459.          Top             =   2760
  460.          Width           =   300
  461.       End
  462.       Begin VB.Label lblItemName 
  463.          Alignment       =   2  'Center
  464.          Height          =   195
  465.          Left            =   105
  466.          TabIndex        =   85
  467.          Top             =   2580
  468.          Width           =   1590
  469.       End
  470.    End
  471.    Begin VB.Frame fraEnemyWarpPath 
  472.       Caption         =   "Player 2 Warp Path"
  473.       BeginProperty Font 
  474.          Name            =   "MS Sans Serif"
  475.          Size            =   8.25
  476.          Charset         =   0
  477.          Weight          =   700
  478.          Underline       =   0   'False
  479.          Italic          =   0   'False
  480.          Strikethrough   =   0   'False
  481.       EndProperty
  482.       Height          =   975
  483.       Left            =   1515
  484.       TabIndex        =   23
  485.       Top             =   30
  486.       Width           =   6015
  487.       Begin VB.CommandButton cmdPreviewEnemy2 
  488.          Caption         =   "Ship 2"
  489.          Height          =   255
  490.          Left            =   75
  491.          TabIndex        =   117
  492.          Top             =   585
  493.          Width           =   775
  494.       End
  495.       Begin VB.CommandButton cmdPreviewEnemy1 
  496.          Caption         =   "Ship 1"
  497.          Height          =   255
  498.          Left            =   75
  499.          TabIndex        =   116
  500.          Top             =   255
  501.          Width           =   775
  502.       End
  503.       Begin VB.PictureBox picEnemyPath 
  504.          AutoRedraw      =   -1  'True
  505.          BackColor       =   &H000000C0&
  506.          ForeColor       =   &H000000FF&
  507.          Height          =   675
  508.          Index           =   7
  509.          Left            =   5295
  510.          ScaleHeight     =   615
  511.          ScaleWidth      =   570
  512.          TabIndex        =   98
  513.          Top             =   195
  514.          Width           =   625
  515.       End
  516.       Begin VB.PictureBox picEnemyPath 
  517.          AutoRedraw      =   -1  'True
  518.          BackColor       =   &H000040C0&
  519.          ForeColor       =   &H000000FF&
  520.          Height          =   675
  521.          Index           =   6
  522.          Left            =   4665
  523.          ScaleHeight     =   615
  524.          ScaleWidth      =   570
  525.          TabIndex        =   97
  526.          Top             =   195
  527.          Width           =   625
  528.       End
  529.       Begin VB.PictureBox picEnemyPath 
  530.          AutoRedraw      =   -1  'True
  531.          BackColor       =   &H00000000&
  532.          ForeColor       =   &H000000FF&
  533.          Height          =   675
  534.          Index           =   5
  535.          Left            =   4035
  536.          ScaleHeight     =   615
  537.          ScaleWidth      =   570
  538.          TabIndex        =   96
  539.          Top             =   195
  540.          Width           =   625
  541.       End
  542.       Begin VB.PictureBox picEnemyPath 
  543.          AutoRedraw      =   -1  'True
  544.          BackColor       =   &H00000000&
  545.          ForeColor       =   &H000000FF&
  546.          Height          =   675
  547.          Index           =   4
  548.          Left            =   3405
  549.          ScaleHeight     =   615
  550.          ScaleWidth      =   570
  551.          TabIndex        =   95
  552.          Top             =   195
  553.          Width           =   625
  554.       End
  555.       Begin VB.PictureBox picEnemyPath 
  556.          AutoRedraw      =   -1  'True
  557.          BackColor       =   &H00000000&
  558.          ForeColor       =   &H000000FF&
  559.          Height          =   675
  560.          Index           =   3
  561.          Left            =   2775
  562.          ScaleHeight     =   615
  563.          ScaleWidth      =   570
  564.          TabIndex        =   94
  565.          Top             =   195
  566.          Width           =   625
  567.       End
  568.       Begin VB.PictureBox picEnemyPath 
  569.          AutoRedraw      =   -1  'True
  570.          BackColor       =   &H00000000&
  571.          ForeColor       =   &H000000FF&
  572.          Height          =   675
  573.          Index           =   2
  574.          Left            =   2140
  575.          ScaleHeight     =   615
  576.          ScaleWidth      =   570
  577.          TabIndex        =   93
  578.          Top             =   195
  579.          Width           =   625
  580.       End
  581.       Begin VB.PictureBox picEnemyPath 
  582.          AutoRedraw      =   -1  'True
  583.          BackColor       =   &H00000000&
  584.          ForeColor       =   &H000000FF&
  585.          Height          =   675
  586.          Index           =   1
  587.          Left            =   1515
  588.          ScaleHeight     =   615
  589.          ScaleWidth      =   570
  590.          TabIndex        =   92
  591.          Top             =   195
  592.          Width           =   625
  593.       End
  594.       Begin VB.PictureBox picEnemyPath 
  595.          AutoRedraw      =   -1  'True
  596.          BackColor       =   &H00400000&
  597.          ForeColor       =   &H000000FF&
  598.          Height          =   675
  599.          Index           =   0
  600.          Left            =   885
  601.          ScaleHeight     =   615
  602.          ScaleWidth      =   570
  603.          TabIndex        =   91
  604.          Top             =   195
  605.          Width           =   625
  606.       End
  607.    End
  608.    Begin VB.Frame fraWarpPath 
  609.       Caption         =   "Player 1 Warp Path"
  610.       BeginProperty Font 
  611.          Name            =   "MS Sans Serif"
  612.          Size            =   8.25
  613.          Charset         =   0
  614.          Weight          =   700
  615.          Underline       =   0   'False
  616.          Italic          =   0   'False
  617.          Strikethrough   =   0   'False
  618.       EndProperty
  619.       Height          =   975
  620.       Left            =   1545
  621.       TabIndex        =   12
  622.       Top             =   5445
  623.       Width           =   6045
  624.       Begin VB.CommandButton cmdPreviewShip2 
  625.          Caption         =   "Ship 2"
  626.          Height          =   255
  627.          Left            =   75
  628.          TabIndex        =   119
  629.          Top             =   585
  630.          Width           =   775
  631.       End
  632.       Begin VB.CommandButton cmdPreviewShip1 
  633.          Caption         =   "Ship 1"
  634.          Height          =   255
  635.          Left            =   75
  636.          TabIndex        =   118
  637.          Top             =   255
  638.          Width           =   775
  639.       End
  640.       Begin VB.PictureBox picPlayerPath 
  641.          AutoRedraw      =   -1  'True
  642.          BackColor       =   &H000000C0&
  643.          BeginProperty Font 
  644.             Name            =   "MS Serif"
  645.             Size            =   6.75
  646.             Charset         =   0
  647.             Weight          =   400
  648.             Underline       =   0   'False
  649.             Italic          =   0   'False
  650.             Strikethrough   =   0   'False
  651.          EndProperty
  652.          ForeColor       =   &H0000FFFF&
  653.          Height          =   675
  654.          Index           =   7
  655.          Left            =   5310
  656.          ScaleHeight     =   615
  657.          ScaleWidth      =   570
  658.          TabIndex        =   106
  659.          Top             =   195
  660.          Width           =   625
  661.       End
  662.       Begin VB.PictureBox picPlayerPath 
  663.          AutoRedraw      =   -1  'True
  664.          BackColor       =   &H000040C0&
  665.          BeginProperty Font 
  666.             Name            =   "MS Serif"
  667.             Size            =   6.75
  668.             Charset         =   0
  669.             Weight          =   400
  670.             Underline       =   0   'False
  671.             Italic          =   0   'False
  672.             Strikethrough   =   0   'False
  673.          EndProperty
  674.          ForeColor       =   &H0000FFFF&
  675.          Height          =   675
  676.          Index           =   6
  677.          Left            =   4680
  678.          ScaleHeight     =   615
  679.          ScaleWidth      =   570
  680.          TabIndex        =   105
  681.          Top             =   195
  682.          Width           =   625
  683.       End
  684.       Begin VB.PictureBox picPlayerPath 
  685.          AutoRedraw      =   -1  'True
  686.          BackColor       =   &H00000000&
  687.          BeginProperty Font 
  688.             Name            =   "MS Serif"
  689.             Size            =   6.75
  690.             Charset         =   0
  691.             Weight          =   400
  692.             Underline       =   0   'False
  693.             Italic          =   0   'False
  694.             Strikethrough   =   0   'False
  695.          EndProperty
  696.          ForeColor       =   &H0000FFFF&
  697.          Height          =   675
  698.          Index           =   5
  699.          Left            =   4050
  700.          ScaleHeight     =   615
  701.          ScaleWidth      =   570
  702.          TabIndex        =   104
  703.          Top             =   195
  704.          Width           =   625
  705.       End
  706.       Begin VB.PictureBox picPlayerPath 
  707.          AutoRedraw      =   -1  'True
  708.          BackColor       =   &H00000000&
  709.          BeginProperty Font 
  710.             Name            =   "MS Serif"
  711.             Size            =   6.75
  712.             Charset         =   0
  713.             Weight          =   400
  714.             Underline       =   0   'False
  715.             Italic          =   0   'False
  716.             Strikethrough   =   0   'False
  717.          EndProperty
  718.          ForeColor       =   &H0000FFFF&
  719.          Height          =   675
  720.          Index           =   4
  721.          Left            =   3420
  722.          ScaleHeight     =   615
  723.          ScaleWidth      =   570
  724.          TabIndex        =   103
  725.          Top             =   195
  726.          Width           =   625
  727.       End
  728.       Begin VB.PictureBox picPlayerPath 
  729.          AutoRedraw      =   -1  'True
  730.          BackColor       =   &H00000000&
  731.          BeginProperty Font 
  732.             Name            =   "MS Serif"
  733.             Size            =   6.75
  734.             Charset         =   0
  735.             Weight          =   400
  736.             Underline       =   0   'False
  737.             Italic          =   0   'False
  738.             Strikethrough   =   0   'False
  739.          EndProperty
  740.          ForeColor       =   &H0000FFFF&
  741.          Height          =   675
  742.          Index           =   3
  743.          Left            =   2790
  744.          ScaleHeight     =   615
  745.          ScaleWidth      =   570
  746.          TabIndex        =   102
  747.          Top             =   195
  748.          Width           =   625
  749.       End
  750.       Begin VB.PictureBox picPlayerPath 
  751.          AutoRedraw      =   -1  'True
  752.          BackColor       =   &H00000000&
  753.          BeginProperty Font 
  754.             Name            =   "MS Serif"
  755.             Size            =   6.75
  756.             Charset         =   0
  757.             Weight          =   400
  758.             Underline       =   0   'False
  759.             Italic          =   0   'False
  760.             Strikethrough   =   0   'False
  761.          EndProperty
  762.          ForeColor       =   &H0000FFFF&
  763.          Height          =   675
  764.          Index           =   2
  765.          Left            =   2160
  766.          ScaleHeight     =   615
  767.          ScaleWidth      =   570
  768.          TabIndex        =   101
  769.          Top             =   195
  770.          Width           =   625
  771.       End
  772.       Begin VB.PictureBox picPlayerPath 
  773.          AutoRedraw      =   -1  'True
  774.          BackColor       =   &H00000000&
  775.          BeginProperty Font 
  776.             Name            =   "MS Serif"
  777.             Size            =   6.75
  778.             Charset         =   0
  779.             Weight          =   400
  780.             Underline       =   0   'False
  781.             Italic          =   0   'False
  782.             Strikethrough   =   0   'False
  783.          EndProperty
  784.          ForeColor       =   &H0000FFFF&
  785.          Height          =   675
  786.          Index           =   1
  787.          Left            =   1530
  788.          ScaleHeight     =   615
  789.          ScaleWidth      =   570
  790.          TabIndex        =   100
  791.          Top             =   195
  792.          Width           =   625
  793.       End
  794.       Begin VB.PictureBox picPlayerPath 
  795.          AutoRedraw      =   -1  'True
  796.          BackColor       =   &H00400000&
  797.          BeginProperty Font 
  798.             Name            =   "MS Serif"
  799.             Size            =   6.75
  800.             Charset         =   0
  801.             Weight          =   400
  802.             Underline       =   0   'False
  803.             Italic          =   0   'False
  804.             Strikethrough   =   0   'False
  805.          EndProperty
  806.          ForeColor       =   &H0000FFFF&
  807.          Height          =   675
  808.          Index           =   0
  809.          Left            =   900
  810.          ScaleHeight     =   615
  811.          ScaleWidth      =   570
  812.          TabIndex        =   99
  813.          Top             =   195
  814.          Width           =   625
  815.       End
  816.    End
  817.    Begin VB.Frame fraPlayerStats 
  818.       Caption         =   "Player Stats"
  819.       BeginProperty Font 
  820.          Name            =   "MS Sans Serif"
  821.          Size            =   8.25
  822.          Charset         =   0
  823.          Weight          =   700
  824.          Underline       =   0   'False
  825.          Italic          =   0   'False
  826.          Strikethrough   =   0   'False
  827.       EndProperty
  828.       Height          =   2595
  829.       Left            =   60
  830.       TabIndex        =   5
  831.       Top             =   2430
  832.       Width           =   1440
  833.       Begin VB.TextBox txtProduction 
  834.          BackColor       =   &H00000000&
  835.          BeginProperty Font 
  836.             Name            =   "MS Sans Serif"
  837.             Size            =   8.25
  838.             Charset         =   0
  839.             Weight          =   700
  840.             Underline       =   0   'False
  841.             Italic          =   0   'False
  842.             Strikethrough   =   0   'False
  843.          EndProperty
  844.          ForeColor       =   &H0000FF00&
  845.          Height          =   300
  846.          Left            =   405
  847.          MultiLine       =   -1  'True
  848.          TabIndex        =   137
  849.          Top             =   2160
  850.          Width           =   660
  851.       End
  852.       Begin VB.TextBox txtNumAssaultTroops 
  853.          BackColor       =   &H00000000&
  854.          BeginProperty Font 
  855.             Name            =   "MS Sans Serif"
  856.             Size            =   8.25
  857.             Charset         =   0
  858.             Weight          =   700
  859.             Underline       =   0   'False
  860.             Italic          =   0   'False
  861.             Strikethrough   =   0   'False
  862.          EndProperty
  863.          ForeColor       =   &H0000FF00&
  864.          Height          =   285
  865.          Left            =   675
  866.          MultiLine       =   -1  'True
  867.          TabIndex        =   109
  868.          Top             =   1020
  869.          Width           =   660
  870.       End
  871.       Begin VB.TextBox txtNumResources 
  872.          BackColor       =   &H00000000&
  873.          BeginProperty Font 
  874.             Name            =   "MS Sans Serif"
  875.             Size            =   8.25
  876.             Charset         =   0
  877.             Weight          =   700
  878.             Underline       =   0   'False
  879.             Italic          =   0   'False
  880.             Strikethrough   =   0   'False
  881.          EndProperty
  882.          ForeColor       =   &H0000FF00&
  883.          Height          =   285
  884.          Left            =   405
  885.          MultiLine       =   -1  'True
  886.          TabIndex        =   11
  887.          Top             =   1590
  888.          Width           =   660
  889.       End
  890.       Begin VB.TextBox txtNumTroops 
  891.          BackColor       =   &H00000000&
  892.          BeginProperty Font 
  893.             Name            =   "MS Sans Serif"
  894.             Size            =   8.25
  895.             Charset         =   0
  896.             Weight          =   700
  897.             Underline       =   0   'False
  898.             Italic          =   0   'False
  899.             Strikethrough   =   0   'False
  900.          EndProperty
  901.          ForeColor       =   &H0000FF00&
  902.          Height          =   285
  903.          Left            =   675
  904.          MultiLine       =   -1  'True
  905.          TabIndex        =   10
  906.          Top             =   645
  907.          Width           =   660
  908.       End
  909.       Begin VB.TextBox txtNumPlanets 
  910.          BackColor       =   &H00000000&
  911.          BeginProperty Font 
  912.             Name            =   "MS Sans Serif"
  913.             Size            =   8.25
  914.             Charset         =   0
  915.             Weight          =   700
  916.             Underline       =   0   'False
  917.             Italic          =   0   'False
  918.             Strikethrough   =   0   'False
  919.          EndProperty
  920.          ForeColor       =   &H0000FF00&
  921.          Height          =   285
  922.          Left            =   675
  923.          MultiLine       =   -1  'True
  924.          TabIndex        =   9
  925.          Top             =   270
  926.          Width           =   660
  927.       End
  928.       Begin VB.Label Label1 
  929.          Caption         =   "Resources/Turn:"
  930.          Height          =   210
  931.          Left            =   105
  932.          TabIndex        =   136
  933.          Top             =   1920
  934.          Width           =   1290
  935.       End
  936.       Begin VB.Label lblAssaultTroops 
  937.          Caption         =   "Mechs:"
  938.          Height          =   225
  939.          Left            =   90
  940.          TabIndex        =   108
  941.          Top             =   1050
  942.          Width           =   570
  943.       End
  944.       Begin VB.Label lblResources 
  945.          Caption         =   "Total Resources:"
  946.          Height          =   210
  947.          Left            =   90
  948.          TabIndex        =   8
  949.          Top             =   1365
  950.          Width           =   1260
  951.       End
  952.       Begin VB.Label lblNumTroops 
  953.          Caption         =   "Troops:"
  954.          Height          =   225
  955.          Left            =   75
  956.          TabIndex        =   7
  957.          Top             =   675
  958.          Width           =   570
  959.       End
  960.       Begin VB.Label lblnumplanets 
  961.          Caption         =   "Planets:"
  962.          Height          =   210
  963.          Left            =   60
  964.          TabIndex        =   6
  965.          Top             =   300
  966.          Width           =   615
  967.       End
  968.    End
  969.    Begin VB.CommandButton cmdAbort 
  970.       Caption         =   "&Abort"
  971.       Height          =   330
  972.       Left            =   180
  973.       TabIndex        =   4
  974.       Top             =   5820
  975.       Width           =   1200
  976.    End
  977.    Begin VB.Timer tmrRandomSounds 
  978.       Interval        =   35000
  979.       Left            =   495
  980.       Top             =   6180
  981.    End
  982.    Begin VB.Frame fraMessages 
  983.       Caption         =   "Messages"
  984.       BeginProperty Font 
  985.          Name            =   "MS Sans Serif"
  986.          Size            =   8.25
  987.          Charset         =   0
  988.          Weight          =   700
  989.          Underline       =   0   'False
  990.          Italic          =   0   'False
  991.          Strikethrough   =   0   'False
  992.       EndProperty
  993.       Height          =   1395
  994.       Left            =   45
  995.       TabIndex        =   2
  996.       Top             =   1005
  997.       Width           =   1455
  998.       Begin VB.CommandButton cmdViewSend 
  999.          Caption         =   "&View/Send"
  1000.          Height          =   300
  1001.          Left            =   60
  1002.          TabIndex        =   54
  1003.          Top             =   975
  1004.          Width           =   1275
  1005.       End
  1006.       Begin VB.TextBox txtMessages 
  1007.          BackColor       =   &H00000000&
  1008.          BeginProperty Font 
  1009.             Name            =   "Arial"
  1010.             Size            =   8.25
  1011.             Charset         =   0
  1012.             Weight          =   400
  1013.             Underline       =   0   'False
  1014.             Italic          =   0   'False
  1015.             Strikethrough   =   0   'False
  1016.          EndProperty
  1017.          ForeColor       =   &H0000FF00&
  1018.          Height          =   645
  1019.          Left            =   45
  1020.          MultiLine       =   -1  'True
  1021.          TabIndex        =   3
  1022.          Text            =   "FRMGAMES.frx":8D7E
  1023.          Top             =   240
  1024.          Width           =   1350
  1025.       End
  1026.    End
  1027.    Begin VB.TextBox txtStatus 
  1028.       BackColor       =   &H00000000&
  1029.       BeginProperty Font 
  1030.          Name            =   "MS Sans Serif"
  1031.          Size            =   8.25
  1032.          Charset         =   0
  1033.          Weight          =   700
  1034.          Underline       =   0   'False
  1035.          Italic          =   0   'False
  1036.          Strikethrough   =   0   'False
  1037.       EndProperty
  1038.       ForeColor       =   &H0000FF00&
  1039.       Height          =   330
  1040.       Left            =   90
  1041.       Locked          =   -1  'True
  1042.       TabIndex        =   1
  1043.       Top             =   6480
  1044.       Width           =   5070
  1045.    End
  1046.    Begin VB.PictureBox picGalaxy 
  1047.       AutoRedraw      =   -1  'True
  1048.       AutoSize        =   -1  'True
  1049.       BackColor       =   &H00000000&
  1050.       BeginProperty Font 
  1051.          Name            =   "MS Serif"
  1052.          Size            =   6
  1053.          Charset         =   0
  1054.          Weight          =   400
  1055.          Underline       =   0   'False
  1056.          Italic          =   0   'False
  1057.          Strikethrough   =   0   'False
  1058.       EndProperty
  1059.       ForeColor       =   &H00FFFFFF&
  1060.       Height          =   4095
  1061.       Left            =   1800
  1062.       ScaleHeight     =   4035
  1063.       ScaleWidth      =   5670
  1064.       TabIndex        =   0
  1065.       Top             =   1230
  1066.       Width           =   5730
  1067.       Begin VB.PictureBox picPlanet 
  1068.          Appearance      =   0  'Flat
  1069.          AutoSize        =   -1  'True
  1070.          BackColor       =   &H80000005&
  1071.          BorderStyle     =   0  'None
  1072.          ForeColor       =   &H80000008&
  1073.          Height          =   225
  1074.          Index           =   49
  1075.          Left            =   5220
  1076.          Picture         =   "FRMGAMES.frx":8D99
  1077.          ScaleHeight     =   225
  1078.          ScaleWidth      =   225
  1079.          TabIndex        =   83
  1080.          Top             =   3510
  1081.          Width           =   225
  1082.       End
  1083.       Begin VB.PictureBox picPlanet 
  1084.          Appearance      =   0  'Flat
  1085.          AutoSize        =   -1  'True
  1086.          BackColor       =   &H80000005&
  1087.          BorderStyle     =   0  'None
  1088.          ForeColor       =   &H80000008&
  1089.          Height          =   225
  1090.          Index           =   48
  1091.          Left            =   4770
  1092.          Picture         =   "FRMGAMES.frx":92CB
  1093.          ScaleHeight     =   225
  1094.          ScaleWidth      =   225
  1095.          TabIndex        =   82
  1096.          Top             =   3120
  1097.          Width           =   225
  1098.       End
  1099.       Begin VB.PictureBox picPlanet 
  1100.          Appearance      =   0  'Flat
  1101.          AutoSize        =   -1  'True
  1102.          BackColor       =   &H80000005&
  1103.          BorderStyle     =   0  'None
  1104.          ForeColor       =   &H80000008&
  1105.          Height          =   210
  1106.          Index           =   47
  1107.          Left            =   4320
  1108.          Picture         =   "FRMGAMES.frx":97FD
  1109.          ScaleHeight     =   210
  1110.          ScaleWidth      =   210
  1111.          TabIndex        =   81
  1112.          Top             =   3660
  1113.          Width           =   210
  1114.       End
  1115.       Begin VB.PictureBox picPlanet 
  1116.          Appearance      =   0  'Flat
  1117.          AutoSize        =   -1  'True
  1118.          BackColor       =   &H80000005&
  1119.          BorderStyle     =   0  'None
  1120.          ForeColor       =   &H80000008&
  1121.          Height          =   225
  1122.          Index           =   46
  1123.          Left            =   3540
  1124.          Picture         =   "FRMGAMES.frx":9D1F
  1125.          ScaleHeight     =   225
  1126.          ScaleWidth      =   225
  1127.          TabIndex        =   80
  1128.          Top             =   3360
  1129.          Width           =   225
  1130.       End
  1131.       Begin VB.PictureBox picPlanet 
  1132.          Appearance      =   0  'Flat
  1133.          AutoSize        =   -1  'True
  1134.          BackColor       =   &H80000005&
  1135.          BorderStyle     =   0  'None
  1136.          ForeColor       =   &H80000008&
  1137.          Height          =   225
  1138.          Index           =   45
  1139.          Left            =   2820
  1140.          Picture         =   "FRMGAMES.frx":A251
  1141.          ScaleHeight     =   225
  1142.          ScaleWidth      =   225
  1143.          TabIndex        =   79
  1144.          Top             =   3300
  1145.          Width           =   225
  1146.       End
  1147.       Begin VB.PictureBox picPlanet 
  1148.          Appearance      =   0  'Flat
  1149.          AutoSize        =   -1  'True
  1150.          BackColor       =   &H80000005&
  1151.          BorderStyle     =   0  'None
  1152.          ForeColor       =   &H80000008&
  1153.          Height          =   225
  1154.          Index           =   44
  1155.          Left            =   2160
  1156.          Picture         =   "FRMGAMES.frx":A783
  1157.          ScaleHeight     =   225
  1158.          ScaleWidth      =   225
  1159.          TabIndex        =   78
  1160.          Top             =   3660
  1161.          Width           =   225
  1162.       End
  1163.       Begin VB.PictureBox picPlanet 
  1164.          Appearance      =   0  'Flat
  1165.          AutoSize        =   -1  'True
  1166.          BackColor       =   &H80000005&
  1167.          BorderStyle     =   0  'None
  1168.          ForeColor       =   &H80000008&
  1169.          Height          =   225
  1170.          Index           =   43
  1171.          Left            =   1620
  1172.          Picture         =   "FRMGAMES.frx":ACB5
  1173.          ScaleHeight     =   225
  1174.          ScaleWidth      =   225
  1175.          TabIndex        =   77
  1176.          Top             =   3285
  1177.          Width           =   225
  1178.       End
  1179.       Begin VB.PictureBox picPlanet 
  1180.          Appearance      =   0  'Flat
  1181.          AutoSize        =   -1  'True
  1182.          BackColor       =   &H80000005&
  1183.          BorderStyle     =   0  'None
  1184.          ForeColor       =   &H80000008&
  1185.          Height          =   210
  1186.          Index           =   42
  1187.          Left            =   960
  1188.          Picture         =   "FRMGAMES.frx":B1E7
  1189.          ScaleHeight     =   210
  1190.          ScaleWidth      =   210
  1191.          TabIndex        =   76
  1192.          Top             =   3660
  1193.          Width           =   210
  1194.       End
  1195.       Begin VB.PictureBox picPlanet 
  1196.          Appearance      =   0  'Flat
  1197.          AutoSize        =   -1  'True
  1198.          BackColor       =   &H80000005&
  1199.          BorderStyle     =   0  'None
  1200.          ForeColor       =   &H80000008&
  1201.          Height          =   225
  1202.          Index           =   41
  1203.          Left            =   600
  1204.          Picture         =   "FRMGAMES.frx":B709
  1205.          ScaleHeight     =   225
  1206.          ScaleWidth      =   225
  1207.          TabIndex        =   75
  1208.          Top             =   3120
  1209.          Width           =   225
  1210.       End
  1211.       Begin VB.PictureBox picPlanet 
  1212.          Appearance      =   0  'Flat
  1213.          AutoSize        =   -1  'True
  1214.          BackColor       =   &H80000005&
  1215.          BorderStyle     =   0  'None
  1216.          ForeColor       =   &H80000008&
  1217.          Height          =   225
  1218.          Index           =   40
  1219.          Left            =   225
  1220.          Picture         =   "FRMGAMES.frx":BC3B
  1221.          ScaleHeight     =   225
  1222.          ScaleWidth      =   225
  1223.          TabIndex        =   74
  1224.          Top             =   3555
  1225.          Width           =   225
  1226.       End
  1227.       Begin VB.PictureBox picPlanet 
  1228.          Appearance      =   0  'Flat
  1229.          AutoSize        =   -1  'True
  1230.          BackColor       =   &H80000005&
  1231.          BorderStyle     =   0  'None
  1232.          ForeColor       =   &H80000008&
  1233.          Height          =   225
  1234.          Index           =   39
  1235.          Left            =   5340
  1236.          Picture         =   "FRMGAMES.frx":C16D
  1237.          ScaleHeight     =   225
  1238.          ScaleWidth      =   225
  1239.          TabIndex        =   73
  1240.          Top             =   2820
  1241.          Width           =   225
  1242.       End
  1243.       Begin VB.PictureBox picPlanet 
  1244.          Appearance      =   0  'Flat
  1245.          AutoSize        =   -1  'True
  1246.          BackColor       =   &H80000005&
  1247.          BorderStyle     =   0  'None
  1248.          ForeColor       =   &H80000008&
  1249.          Height          =   225
  1250.          Index           =   38
  1251.          Left            =   4920
  1252.          Picture         =   "FRMGAMES.frx":C69F
  1253.          ScaleHeight     =   225
  1254.          ScaleWidth      =   225
  1255.          TabIndex        =   72
  1256.          Top             =   2400
  1257.          Width           =   225
  1258.       End
  1259.       Begin VB.PictureBox picPlanet 
  1260.          Appearance      =   0  'Flat
  1261.          AutoSize        =   -1  'True
  1262.          BackColor       =   &H80000005&
  1263.          BorderStyle     =   0  'None
  1264.          ForeColor       =   &H80000008&
  1265.          Height          =   225
  1266.          Index           =   37
  1267.          Left            =   4230
  1268.          Picture         =   "FRMGAMES.frx":CBD1
  1269.          ScaleHeight     =   225
  1270.          ScaleWidth      =   225
  1271.          TabIndex        =   71
  1272.          Top             =   2820
  1273.          Width           =   225
  1274.       End
  1275.       Begin VB.PictureBox picPlanet 
  1276.          Appearance      =   0  'Flat
  1277.          AutoSize        =   -1  'True
  1278.          BackColor       =   &H80000005&
  1279.          BorderStyle     =   0  'None
  1280.          ForeColor       =   &H80000008&
  1281.          Height          =   210
  1282.          Index           =   36
  1283.          Left            =   3600
  1284.          Picture         =   "FRMGAMES.frx":D103
  1285.          ScaleHeight     =   210
  1286.          ScaleWidth      =   210
  1287.          TabIndex        =   70
  1288.          Top             =   2580
  1289.          Width           =   210
  1290.       End
  1291.       Begin VB.PictureBox picPlanet 
  1292.          Appearance      =   0  'Flat
  1293.          AutoSize        =   -1  'True
  1294.          BackColor       =   &H80000005&
  1295.          BorderStyle     =   0  'None
  1296.          ForeColor       =   &H80000008&
  1297.          Height          =   225
  1298.          Index           =   35
  1299.          Left            =   2820
  1300.          Picture         =   "FRMGAMES.frx":D625
  1301.          ScaleHeight     =   225
  1302.          ScaleWidth      =   225
  1303.          TabIndex        =   69
  1304.          Top             =   2700
  1305.          Width           =   225
  1306.       End
  1307.       Begin VB.PictureBox picPlanet 
  1308.          Appearance      =   0  'Flat
  1309.          AutoSize        =   -1  'True
  1310.          BackColor       =   &H80000005&
  1311.          BorderStyle     =   0  'None
  1312.          ForeColor       =   &H80000008&
  1313.          Height          =   225
  1314.          Index           =   34
  1315.          Left            =   2100
  1316.          Picture         =   "FRMGAMES.frx":DB57
  1317.          ScaleHeight     =   225
  1318.          ScaleWidth      =   225
  1319.          TabIndex        =   68
  1320.          Top             =   2760
  1321.          Width           =   225
  1322.       End
  1323.       Begin VB.PictureBox picPlanet 
  1324.          Appearance      =   0  'Flat
  1325.          AutoSize        =   -1  'True
  1326.          BackColor       =   &H80000005&
  1327.          BorderStyle     =   0  'None
  1328.          ForeColor       =   &H80000008&
  1329.          Height          =   225
  1330.          Index           =   33
  1331.          Left            =   1620
  1332.          Picture         =   "FRMGAMES.frx":E089
  1333.          ScaleHeight     =   225
  1334.          ScaleWidth      =   225
  1335.          TabIndex        =   67
  1336.          Top             =   2355
  1337.          Width           =   225
  1338.       End
  1339.       Begin VB.PictureBox picPlanet 
  1340.          Appearance      =   0  'Flat
  1341.          AutoSize        =   -1  'True
  1342.          BackColor       =   &H80000005&
  1343.          BorderStyle     =   0  'None
  1344.          ForeColor       =   &H80000008&
  1345.          Height          =   225
  1346.          Index           =   32
  1347.          Left            =   1080
  1348.          Picture         =   "FRMGAMES.frx":E5BB
  1349.          ScaleHeight     =   225
  1350.          ScaleWidth      =   225
  1351.          TabIndex        =   66
  1352.          Top             =   2880
  1353.          Width           =   225
  1354.       End
  1355.       Begin VB.PictureBox picPlanet 
  1356.          Appearance      =   0  'Flat
  1357.          AutoSize        =   -1  'True
  1358.          BackColor       =   &H80000005&
  1359.          BorderStyle     =   0  'None
  1360.          ForeColor       =   &H80000008&
  1361.          Height          =   225
  1362.          Index           =   31
  1363.          Left            =   120
  1364.          Picture         =   "FRMGAMES.frx":EAED
  1365.          ScaleHeight     =   225
  1366.          ScaleWidth      =   225
  1367.          TabIndex        =   65
  1368.          Top             =   2760
  1369.          Width           =   225
  1370.       End
  1371.       Begin VB.PictureBox picPlanet 
  1372.          Appearance      =   0  'Flat
  1373.          AutoSize        =   -1  'True
  1374.          BackColor       =   &H80000005&
  1375.          BorderStyle     =   0  'None
  1376.          ForeColor       =   &H80000008&
  1377.          Height          =   210
  1378.          Index           =   30
  1379.          Left            =   900
  1380.          Picture         =   "FRMGAMES.frx":F01F
  1381.          ScaleHeight     =   210
  1382.          ScaleWidth      =   210
  1383.          TabIndex        =   64
  1384.          Top             =   2160
  1385.          Width           =   210
  1386.       End
  1387.       Begin VB.PictureBox picPlanet 
  1388.          Appearance      =   0  'Flat
  1389.          AutoSize        =   -1  'True
  1390.          BackColor       =   &H80000005&
  1391.          BorderStyle     =   0  'None
  1392.          ForeColor       =   &H80000008&
  1393.          Height          =   210
  1394.          Index           =   29
  1395.          Left            =   5340
  1396.          Picture         =   "FRMGAMES.frx":F541
  1397.          ScaleHeight     =   210
  1398.          ScaleWidth      =   210
  1399.          TabIndex        =   63
  1400.          Top             =   1740
  1401.          Width           =   210
  1402.       End
  1403.       Begin VB.PictureBox picPlanet 
  1404.          Appearance      =   0  'Flat
  1405.          AutoSize        =   -1  'True
  1406.          BackColor       =   &H80000005&
  1407.          BorderStyle     =   0  'None
  1408.          ForeColor       =   &H80000008&
  1409.          Height          =   225
  1410.          Index           =   28
  1411.          Left            =   4695
  1412.          Picture         =   "FRMGAMES.frx":FA63
  1413.          ScaleHeight     =   225
  1414.          ScaleWidth      =   225
  1415.          TabIndex        =   62
  1416.          Top             =   1680
  1417.          Width           =   225
  1418.       End
  1419.       Begin VB.PictureBox picPlanet 
  1420.          Appearance      =   0  'Flat
  1421.          AutoSize        =   -1  'True
  1422.          BackColor       =   &H80000005&
  1423.          BorderStyle     =   0  'None
  1424.          ForeColor       =   &H80000008&
  1425.          Height          =   225
  1426.          Index           =   27
  1427.          Left            =   4200
  1428.          Picture         =   "FRMGAMES.frx":FF95
  1429.          ScaleHeight     =   225
  1430.          ScaleWidth      =   225
  1431.          TabIndex        =   61
  1432.          Top             =   2220
  1433.          Width           =   225
  1434.       End
  1435.       Begin VB.PictureBox picPlanet 
  1436.          Appearance      =   0  'Flat
  1437.          AutoSize        =   -1  'True
  1438.          BackColor       =   &H80000005&
  1439.          BorderStyle     =   0  'None
  1440.          ForeColor       =   &H80000008&
  1441.          Height          =   225
  1442.          Index           =   26
  1443.          Left            =   3720
  1444.          Picture         =   "FRMGAMES.frx":104C7
  1445.          ScaleHeight     =   225
  1446.          ScaleWidth      =   225
  1447.          TabIndex        =   60
  1448.          Top             =   1650
  1449.          Width           =   225
  1450.       End
  1451.       Begin VB.PictureBox picPlanet 
  1452.          Appearance      =   0  'Flat
  1453.          AutoSize        =   -1  'True
  1454.          BackColor       =   &H80000005&
  1455.          BorderStyle     =   0  'None
  1456.          ForeColor       =   &H80000008&
  1457.          Height          =   225
  1458.          Index           =   25
  1459.          Left            =   3240
  1460.          Picture         =   "FRMGAMES.frx":109F9
  1461.          ScaleHeight     =   225
  1462.          ScaleWidth      =   225
  1463.          TabIndex        =   59
  1464.          Top             =   1980
  1465.          Width           =   225
  1466.       End
  1467.       Begin VB.PictureBox picPlanet 
  1468.          Appearance      =   0  'Flat
  1469.          AutoSize        =   -1  'True
  1470.          BackColor       =   &H80000005&
  1471.          BorderStyle     =   0  'None
  1472.          ForeColor       =   &H80000008&
  1473.          Height          =   210
  1474.          Index           =   24
  1475.          Left            =   2580
  1476.          Picture         =   "FRMGAMES.frx":10F2B
  1477.          ScaleHeight     =   210
  1478.          ScaleWidth      =   210
  1479.          TabIndex        =   58
  1480.          Top             =   2145
  1481.          Width           =   210
  1482.       End
  1483.       Begin VB.PictureBox picPlanet 
  1484.          Appearance      =   0  'Flat
  1485.          AutoSize        =   -1  'True
  1486.          BackColor       =   &H80000005&
  1487.          BorderStyle     =   0  'None
  1488.          ForeColor       =   &H80000008&
  1489.          Height          =   225
  1490.          Index           =   23
  1491.          Left            =   1995
  1492.          Picture         =   "FRMGAMES.frx":1144D
  1493.          ScaleHeight     =   225
  1494.          ScaleWidth      =   225
  1495.          TabIndex        =   57
  1496.          Top             =   1845
  1497.          Width           =   225
  1498.       End
  1499.       Begin VB.PictureBox picPlanet 
  1500.          Appearance      =   0  'Flat
  1501.          AutoSize        =   -1  'True
  1502.          BackColor       =   &H80000005&
  1503.          BorderStyle     =   0  'None
  1504.          ForeColor       =   &H80000008&
  1505.          Height          =   225
  1506.          Index           =   22
  1507.          Left            =   1350
  1508.          Picture         =   "FRMGAMES.frx":1197F
  1509.          ScaleHeight     =   225
  1510.          ScaleWidth      =   225
  1511.          TabIndex        =   56
  1512.          Top             =   1575
  1513.          Width           =   225
  1514.       End
  1515.       Begin VB.PictureBox picPlanet 
  1516.          Appearance      =   0  'Flat
  1517.          AutoSize        =   -1  'True
  1518.          BackColor       =   &H80000005&
  1519.          BorderStyle     =   0  'None
  1520.          ForeColor       =   &H80000008&
  1521.          Height          =   225
  1522.          Index           =   21
  1523.          Left            =   630
  1524.          Picture         =   "FRMGAMES.frx":11EB1
  1525.          ScaleHeight     =   225
  1526.          ScaleWidth      =   225
  1527.          TabIndex        =   47
  1528.          Top             =   1545
  1529.          Width           =   225
  1530.       End
  1531.       Begin VB.PictureBox picPlanet 
  1532.          Appearance      =   0  'Flat
  1533.          AutoSize        =   -1  'True
  1534.          BackColor       =   &H80000005&
  1535.          BorderStyle     =   0  'None
  1536.          ForeColor       =   &H80000008&
  1537.          Height          =   225
  1538.          Index           =   20
  1539.          Left            =   180
  1540.          Picture         =   "FRMGAMES.frx":123E3
  1541.          ScaleHeight     =   225
  1542.          ScaleWidth      =   225
  1543.          TabIndex        =   46
  1544.          Top             =   2100
  1545.          Width           =   225
  1546.       End
  1547.       Begin VB.PictureBox picPlanet 
  1548.          Appearance      =   0  'Flat
  1549.          AutoSize        =   -1  'True
  1550.          BackColor       =   &H80000005&
  1551.          BorderStyle     =   0  'None
  1552.          ForeColor       =   &H80000008&
  1553.          Height          =   225
  1554.          Index           =   19
  1555.          Left            =   5280
  1556.          Picture         =   "FRMGAMES.frx":12915
  1557.          ScaleHeight     =   225
  1558.          ScaleWidth      =   225
  1559.          TabIndex        =   43
  1560.          Top             =   1080
  1561.          Width           =   225
  1562.       End
  1563.       Begin VB.PictureBox picPlanet 
  1564.          Appearance      =   0  'Flat
  1565.          AutoSize        =   -1  'True
  1566.          BackColor       =   &H80000005&
  1567.          BorderStyle     =   0  'None
  1568.          ForeColor       =   &H80000008&
  1569.          Height          =   225
  1570.          Index           =   18
  1571.          Left            =   4740
  1572.          Picture         =   "FRMGAMES.frx":12E47
  1573.          ScaleHeight     =   225
  1574.          ScaleWidth      =   225
  1575.          TabIndex        =   42
  1576.          Top             =   780
  1577.          Width           =   225
  1578.       End
  1579.       Begin VB.PictureBox picPlanet 
  1580.          Appearance      =   0  'Flat
  1581.          AutoSize        =   -1  'True
  1582.          BackColor       =   &H80000005&
  1583.          BorderStyle     =   0  'None
  1584.          ForeColor       =   &H80000008&
  1585.          Height          =   225
  1586.          Index           =   17
  1587.          Left            =   4230
  1588.          Picture         =   "FRMGAMES.frx":13379
  1589.          ScaleHeight     =   225
  1590.          ScaleWidth      =   225
  1591.          TabIndex        =   41
  1592.          Top             =   1215
  1593.          Width           =   225
  1594.       End
  1595.       Begin VB.PictureBox picPlanet 
  1596.          Appearance      =   0  'Flat
  1597.          AutoSize        =   -1  'True
  1598.          BackColor       =   &H80000005&
  1599.          BorderStyle     =   0  'None
  1600.          ForeColor       =   &H80000008&
  1601.          Height          =   210
  1602.          Index           =   16
  1603.          Left            =   3660
  1604.          Picture         =   "FRMGAMES.frx":138AB
  1605.          ScaleHeight     =   210
  1606.          ScaleWidth      =   210
  1607.          TabIndex        =   40
  1608.          Top             =   960
  1609.          Width           =   210
  1610.       End
  1611.       Begin VB.PictureBox picPlanet 
  1612.          Appearance      =   0  'Flat
  1613.          AutoSize        =   -1  'True
  1614.          BackColor       =   &H80000005&
  1615.          BorderStyle     =   0  'None
  1616.          ForeColor       =   &H80000008&
  1617.          Height          =   225
  1618.          Index           =   15
  1619.          Left            =   2970
  1620.          Picture         =   "FRMGAMES.frx":13DCD
  1621.          ScaleHeight     =   225
  1622.          ScaleWidth      =   225
  1623.          TabIndex        =   39
  1624.          Top             =   1365
  1625.          Width           =   225
  1626.       End
  1627.       Begin VB.PictureBox picPlanet 
  1628.          Appearance      =   0  'Flat
  1629.          AutoSize        =   -1  'True
  1630.          BackColor       =   &H80000005&
  1631.          BorderStyle     =   0  'None
  1632.          ForeColor       =   &H80000008&
  1633.          Height          =   225
  1634.          Index           =   14
  1635.          Left            =   2475
  1636.          Picture         =   "FRMGAMES.frx":142FF
  1637.          ScaleHeight     =   225
  1638.          ScaleWidth      =   225
  1639.          TabIndex        =   38
  1640.          Top             =   870
  1641.          Width           =   225
  1642.       End
  1643.       Begin VB.PictureBox picPlanet 
  1644.          Appearance      =   0  'Flat
  1645.          AutoSize        =   -1  'True
  1646.          BackColor       =   &H80000005&
  1647.          BorderStyle     =   0  'None
  1648.          ForeColor       =   &H80000008&
  1649.          Height          =   225
  1650.          Index           =   13
  1651.          Left            =   2205
  1652.          Picture         =   "FRMGAMES.frx":14831
  1653.          ScaleHeight     =   225
  1654.          ScaleWidth      =   225
  1655.          TabIndex        =   37
  1656.          Top             =   1365
  1657.          Width           =   225
  1658.       End
  1659.       Begin VB.PictureBox picPlanet 
  1660.          Appearance      =   0  'Flat
  1661.          AutoSize        =   -1  'True
  1662.          BackColor       =   &H80000005&
  1663.          BorderStyle     =   0  'None
  1664.          ForeColor       =   &H80000008&
  1665.          Height          =   225
  1666.          Index           =   12
  1667.          Left            =   1620
  1668.          Picture         =   "FRMGAMES.frx":14D63
  1669.          ScaleHeight     =   225
  1670.          ScaleWidth      =   225
  1671.          TabIndex        =   36
  1672.          Top             =   975
  1673.          Width           =   225
  1674.       End
  1675.       Begin VB.PictureBox picPlanet 
  1676.          Appearance      =   0  'Flat
  1677.          AutoSize        =   -1  'True
  1678.          BackColor       =   &H80000005&
  1679.          BorderStyle     =   0  'None
  1680.          ForeColor       =   &H80000008&
  1681.          Height          =   225
  1682.          Index           =   11
  1683.          Left            =   810
  1684.          Picture         =   "FRMGAMES.frx":15295
  1685.          ScaleHeight     =   225
  1686.          ScaleWidth      =   225
  1687.          TabIndex        =   35
  1688.          Top             =   900
  1689.          Width           =   225
  1690.       End
  1691.       Begin VB.PictureBox picPlanet 
  1692.          Appearance      =   0  'Flat
  1693.          AutoSize        =   -1  'True
  1694.          BackColor       =   &H80000005&
  1695.          BorderStyle     =   0  'None
  1696.          ForeColor       =   &H80000008&
  1697.          Height          =   210
  1698.          Index           =   10
  1699.          Left            =   165
  1700.          Picture         =   "FRMGAMES.frx":157C7
  1701.          ScaleHeight     =   210
  1702.          ScaleWidth      =   210
  1703.          TabIndex        =   34
  1704.          Top             =   1125
  1705.          Width           =   210
  1706.       End
  1707.       Begin VB.PictureBox picPlanet 
  1708.          Appearance      =   0  'Flat
  1709.          AutoSize        =   -1  'True
  1710.          BackColor       =   &H80000005&
  1711.          BorderStyle     =   0  'None
  1712.          ForeColor       =   &H80000008&
  1713.          Height          =   225
  1714.          Index           =   9
  1715.          Left            =   5265
  1716.          Picture         =   "FRMGAMES.frx":15CE9
  1717.          ScaleHeight     =   225
  1718.          ScaleWidth      =   225
  1719.          TabIndex        =   33
  1720.          Top             =   345
  1721.          Width           =   225
  1722.       End
  1723.       Begin VB.PictureBox picPlanet 
  1724.          Appearance      =   0  'Flat
  1725.          AutoSize        =   -1  'True
  1726.          BackColor       =   &H80000005&
  1727.          BorderStyle     =   0  'None
  1728.          ForeColor       =   &H80000008&
  1729.          Height          =   210
  1730.          Index           =   8
  1731.          Left            =   4725
  1732.          Picture         =   "FRMGAMES.frx":1621B
  1733.          ScaleHeight     =   210
  1734.          ScaleWidth      =   210
  1735.          TabIndex        =   32
  1736.          Top             =   135
  1737.          Width           =   210
  1738.       End
  1739.       Begin VB.PictureBox picPlanet 
  1740.          Appearance      =   0  'Flat
  1741.          AutoSize        =   -1  'True
  1742.          BackColor       =   &H80000005&
  1743.          BorderStyle     =   0  'None
  1744.          ForeColor       =   &H80000008&
  1745.          Height          =   225
  1746.          Index           =   7
  1747.          Left            =   4140
  1748.          Picture         =   "FRMGAMES.frx":1673D
  1749.          ScaleHeight     =   225
  1750.          ScaleWidth      =   225
  1751.          TabIndex        =   31
  1752.          Top             =   480
  1753.          Width           =   225
  1754.       End
  1755.       Begin VB.PictureBox picPlanet 
  1756.          Appearance      =   0  'Flat
  1757.          AutoSize        =   -1  'True
  1758.          BackColor       =   &H80000005&
  1759.          BorderStyle     =   0  'None
  1760.          ForeColor       =   &H80000008&
  1761.          Height          =   225
  1762.          Index           =   6
  1763.          Left            =   3615
  1764.          Picture         =   "FRMGAMES.frx":16C6F
  1765.          ScaleHeight     =   225
  1766.          ScaleWidth      =   225
  1767.          TabIndex        =   30
  1768.          Top             =   105
  1769.          Width           =   225
  1770.       End
  1771.       Begin VB.PictureBox picPlanet 
  1772.          Appearance      =   0  'Flat
  1773.          AutoSize        =   -1  'True
  1774.          BackColor       =   &H80000005&
  1775.          BorderStyle     =   0  'None
  1776.          ForeColor       =   &H80000008&
  1777.          Height          =   225
  1778.          Index           =   5
  1779.          Left            =   3060
  1780.          Picture         =   "FRMGAMES.frx":171A1
  1781.          ScaleHeight     =   225
  1782.          ScaleWidth      =   225
  1783.          TabIndex        =   29
  1784.          Top             =   525
  1785.          Width           =   225
  1786.       End
  1787.       Begin VB.PictureBox picPlanet 
  1788.          Appearance      =   0  'Flat
  1789.          AutoSize        =   -1  'True
  1790.          BackColor       =   &H80000005&
  1791.          BorderStyle     =   0  'None
  1792.          ForeColor       =   &H80000008&
  1793.          Height          =   210
  1794.          Index           =   4
  1795.          Left            =   2610
  1796.          Picture         =   "FRMGAMES.frx":176D3
  1797.          ScaleHeight     =   210
  1798.          ScaleWidth      =   210
  1799.          TabIndex        =   28
  1800.          Top             =   180
  1801.          Width           =   210
  1802.       End
  1803.       Begin VB.PictureBox picPlanet 
  1804.          Appearance      =   0  'Flat
  1805.          AutoSize        =   -1  'True
  1806.          BackColor       =   &H80000005&
  1807.          BorderStyle     =   0  'None
  1808.          ForeColor       =   &H80000008&
  1809.          Height          =   225
  1810.          Index           =   3
  1811.          Left            =   1905
  1812.          Picture         =   "FRMGAMES.frx":17BF5
  1813.          ScaleHeight     =   225
  1814.          ScaleWidth      =   225
  1815.          TabIndex        =   27
  1816.          Top             =   315
  1817.          Width           =   225
  1818.       End
  1819.       Begin VB.PictureBox picPlanet 
  1820.          Appearance      =   0  'Flat
  1821.          AutoSize        =   -1  'True
  1822.          BackColor       =   &H80000005&
  1823.          BorderStyle     =   0  'None
  1824.          ForeColor       =   &H80000008&
  1825.          Height          =   225
  1826.          Index           =   2
  1827.          Left            =   1140
  1828.          Picture         =   "FRMGAMES.frx":18127
  1829.          ScaleHeight     =   225
  1830.          ScaleWidth      =   225
  1831.          TabIndex        =   26
  1832.          Top             =   360
  1833.          Width           =   225
  1834.       End
  1835.       Begin VB.PictureBox picPlanet 
  1836.          Appearance      =   0  'Flat
  1837.          AutoSize        =   -1  'True
  1838.          BackColor       =   &H80000005&
  1839.          BorderStyle     =   0  'None
  1840.          ForeColor       =   &H80000008&
  1841.          Height          =   225
  1842.          Index           =   1
  1843.          Left            =   570
  1844.          Picture         =   "FRMGAMES.frx":18659
  1845.          ScaleHeight     =   225
  1846.          ScaleWidth      =   225
  1847.          TabIndex        =   25
  1848.          Top             =   60
  1849.          Width           =   225
  1850.       End
  1851.       Begin VB.PictureBox picPlanet 
  1852.          Appearance      =   0  'Flat
  1853.          AutoSize        =   -1  'True
  1854.          BackColor       =   &H80000005&
  1855.          BorderStyle     =   0  'None
  1856.          ForeColor       =   &H80000008&
  1857.          Height          =   225
  1858.          Index           =   0
  1859.          Left            =   150
  1860.          Picture         =   "FRMGAMES.frx":18B8B
  1861.          ScaleHeight     =   225
  1862.          ScaleWidth      =   225
  1863.          TabIndex        =   24
  1864.          Top             =   480
  1865.          Width           =   225
  1866.       End
  1867.    End
  1868.    Begin VB.Frame fraOptions 
  1869.       Caption         =   "Game Options"
  1870.       BeginProperty Font 
  1871.          Name            =   "MS Sans Serif"
  1872.          Size            =   8.25
  1873.          Charset         =   0
  1874.          Weight          =   700
  1875.          Underline       =   0   'False
  1876.          Italic          =   0   'False
  1877.          Strikethrough   =   0   'False
  1878.       EndProperty
  1879.       Height          =   1260
  1880.       Left            =   90
  1881.       TabIndex        =   107
  1882.       Top             =   5145
  1883.       Width           =   1410
  1884.    End
  1885.    Begin VB.Label lblTitle2 
  1886.       BackStyle       =   0  'Transparent
  1887.       Caption         =   "A.D."
  1888.       BeginProperty Font 
  1889.          Name            =   "Times New Roman"
  1890.          Size            =   24
  1891.          Charset         =   0
  1892.          Weight          =   700
  1893.          Underline       =   0   'False
  1894.          Italic          =   0   'False
  1895.          Strikethrough   =   0   'False
  1896.       EndProperty
  1897.       ForeColor       =   &H00000080&
  1898.       Height          =   495
  1899.       Left            =   300
  1900.       TabIndex        =   122
  1901.       Top             =   450
  1902.       Width           =   945
  1903.    End
  1904.    Begin VB.Label lblTitle 
  1905.       BackStyle       =   0  'Transparent
  1906.       Caption         =   "4000"
  1907.       BeginProperty Font 
  1908.          Name            =   "Times New Roman"
  1909.          Size            =   24
  1910.          Charset         =   0
  1911.          Weight          =   700
  1912.          Underline       =   0   'False
  1913.          Italic          =   0   'False
  1914.          Strikethrough   =   0   'False
  1915.       EndProperty
  1916.       ForeColor       =   &H00000080&
  1917.       Height          =   510
  1918.       Left            =   225
  1919.       TabIndex        =   121
  1920.       Top             =   30
  1921.       Width           =   1050
  1922.    End
  1923.    Begin VB.Label lblE 
  1924.       Caption         =   "E"
  1925.       BeginProperty Font 
  1926.          Name            =   "MS Sans Serif"
  1927.          Size            =   8.25
  1928.          Charset         =   0
  1929.          Weight          =   700
  1930.          Underline       =   0   'False
  1931.          Italic          =   0   'False
  1932.          Strikethrough   =   0   'False
  1933.       EndProperty
  1934.       Height          =   195
  1935.       Left            =   6900
  1936.       TabIndex        =   22
  1937.       Top             =   1020
  1938.       Width           =   255
  1939.    End
  1940.    Begin VB.Label lblD 
  1941.       Caption         =   "D"
  1942.       BeginProperty Font 
  1943.          Name            =   "MS Sans Serif"
  1944.          Size            =   8.25
  1945.          Charset         =   0
  1946.          Weight          =   700
  1947.          Underline       =   0   'False
  1948.          Italic          =   0   'False
  1949.          Strikethrough   =   0   'False
  1950.       EndProperty
  1951.       Height          =   195
  1952.       Left            =   5820
  1953.       TabIndex        =   21
  1954.       Top             =   1020
  1955.       Width           =   195
  1956.    End
  1957.    Begin VB.Label lblC 
  1958.       Caption         =   "C"
  1959.       BeginProperty Font 
  1960.          Name            =   "MS Sans Serif"
  1961.          Size            =   8.25
  1962.          Charset         =   0
  1963.          Weight          =   700
  1964.          Underline       =   0   'False
  1965.          Italic          =   0   'False
  1966.          Strikethrough   =   0   'False
  1967.       EndProperty
  1968.       Height          =   255
  1969.       Left            =   4620
  1970.       TabIndex        =   20
  1971.       Top             =   1020
  1972.       Width           =   195
  1973.    End
  1974.    Begin VB.Label lblB 
  1975.       Caption         =   "B"
  1976.       BeginProperty Font 
  1977.          Name            =   "MS Sans Serif"
  1978.          Size            =   8.25
  1979.          Charset         =   0
  1980.          Weight          =   700
  1981.          Underline       =   0   'False
  1982.          Italic          =   0   'False
  1983.          Strikethrough   =   0   'False
  1984.       EndProperty
  1985.       Height          =   195
  1986.       Left            =   3480
  1987.       TabIndex        =   19
  1988.       Top             =   1020
  1989.       Width           =   195
  1990.    End
  1991.    Begin VB.Label lblA 
  1992.       Caption         =   "A"
  1993.       BeginProperty Font 
  1994.          Name            =   "MS Sans Serif"
  1995.          Size            =   8.25
  1996.          Charset         =   0
  1997.          Weight          =   700
  1998.          Underline       =   0   'False
  1999.          Italic          =   0   'False
  2000.          Strikethrough   =   0   'False
  2001.       EndProperty
  2002.       Height          =   195
  2003.       Left            =   2340
  2004.       TabIndex        =   18
  2005.       Top             =   1020
  2006.       Width           =   195
  2007.    End
  2008.    Begin VB.Label lblFive 
  2009.       Caption         =   "5"
  2010.       BeginProperty Font 
  2011.          Name            =   "MS Sans Serif"
  2012.          Size            =   8.25
  2013.          Charset         =   0
  2014.          Weight          =   700
  2015.          Underline       =   0   'False
  2016.          Italic          =   0   'False
  2017.          Strikethrough   =   0   'False
  2018.       EndProperty
  2019.       Height          =   255
  2020.       Left            =   1620
  2021.       TabIndex        =   17
  2022.       Top             =   4800
  2023.       Width           =   195
  2024.    End
  2025.    Begin VB.Label lblFour 
  2026.       Caption         =   "4"
  2027.       BeginProperty Font 
  2028.          Name            =   "MS Sans Serif"
  2029.          Size            =   8.25
  2030.          Charset         =   0
  2031.          Weight          =   700
  2032.          Underline       =   0   'False
  2033.          Italic          =   0   'False
  2034.          Strikethrough   =   0   'False
  2035.       EndProperty
  2036.       Height          =   255
  2037.       Left            =   1620
  2038.       TabIndex        =   16
  2039.       Top             =   3960
  2040.       Width           =   195
  2041.    End
  2042.    Begin VB.Label lblThree 
  2043.       Caption         =   "3"
  2044.       BeginProperty Font 
  2045.          Name            =   "MS Sans Serif"
  2046.          Size            =   8.25
  2047.          Charset         =   0
  2048.          Weight          =   700
  2049.          Underline       =   0   'False
  2050.          Italic          =   0   'False
  2051.          Strikethrough   =   0   'False
  2052.       EndProperty
  2053.       Height          =   255
  2054.       Left            =   1620
  2055.       TabIndex        =   15
  2056.       Top             =   3180
  2057.       Width           =   135
  2058.    End
  2059.    Begin VB.Label lblTwo 
  2060.       Caption         =   "2"
  2061.       BeginProperty Font 
  2062.          Name            =   "MS Sans Serif"
  2063.          Size            =   8.25
  2064.          Charset         =   0
  2065.          Weight          =   700
  2066.          Underline       =   0   'False
  2067.          Italic          =   0   'False
  2068.          Strikethrough   =   0   'False
  2069.       EndProperty
  2070.       Height          =   315
  2071.       Left            =   1620
  2072.       TabIndex        =   14
  2073.       Top             =   2400
  2074.       Width           =   195
  2075.    End
  2076.    Begin VB.Label lblOne 
  2077.       Caption         =   "1"
  2078.       BeginProperty Font 
  2079.          Name            =   "MS Sans Serif"
  2080.          Size            =   8.25
  2081.          Charset         =   0
  2082.          Weight          =   700
  2083.          Underline       =   0   'False
  2084.          Italic          =   0   'False
  2085.          Strikethrough   =   0   'False
  2086.       EndProperty
  2087.       Height          =   255
  2088.       Left            =   1620
  2089.       TabIndex        =   13
  2090.       Top             =   1560
  2091.       Width           =   195
  2092.    End
  2093. Attribute VB_Name = "frmGameScreen"
  2094. Attribute VB_GlobalNameSpace = False
  2095. Attribute VB_Creatable = False
  2096. Attribute VB_PredeclaredId = True
  2097. Attribute VB_Exposed = False
  2098. Option Explicit
  2099. 'declare the function keys
  2100. Const vbKeyF1 = &H70    'for help
  2101. Const vbKeyF2 = &H71    'to save the game
  2102. Const vbKeyF3 = &H72    'to quit without saving
  2103. Const vbKeyF4 = &H73
  2104. Dim CloakingChecked(2) As Boolean    'so cloaked ships are only checked once/turn
  2105.                                      'to see if they're hidden or not
  2106. Public Warp7WarningGiven As Boolean
  2107. Public Warp8WarningGiven As Boolean  'to limit the warp path warnings to once at
  2108.                                     'the beginning of the turn, and again when
  2109.                                     'the player hits cmdendturn
  2110.                                     
  2111. Public NumPlanets1 As Integer       'checks number of planets in range on warp 8
  2112.                                     'if zero, ship is destroyed
  2113.                                 
  2114. Public NumPlanets2 As Integer       'same, for ship 2
  2115. Public GridLinesOn As Boolean       'whether or not the grid lines are showing
  2116. Public ContaminationWarningGiven As Boolean  'to only show contamination results msgbox once/turn
  2117. Private Sub cmdAbort_Click()
  2118. 'abort the game without saving
  2119. PlaySoundEffect "Button2"
  2120. If MsgBox("Are you sure you want to quit without saving?", vbQuestion + vbYesNo, "Abort Turn") = vbYes Then
  2121.     PlaySoundEffect "Abort"
  2122.     Dim Counter
  2123.     For Counter = 1 To 100000
  2124.     Next Counter
  2125.     'deregister help file
  2126.     QuitHelp
  2127.     'turn off scanner
  2128.     If ScannerOn Then
  2129.         cmdScan_Click
  2130.         ScannerOn = False
  2131.         cmdScan.Enabled = False
  2132.     End If
  2133.     If TurnNumber = 1 Then
  2134.         'for some as-yet unknown reason (at least to me),
  2135.         'the program will not shut all the way down on turn 1
  2136.         'unless I use End - I know it makes no sense, but...
  2137.         End
  2138.         
  2139.     Else
  2140.        '***Alternative to using End:
  2141.         Dim F As Long
  2142.         'fade form into taskbar
  2143.         Me.WindowState = 1
  2144.         'count forms opened
  2145.         For F = Forms.Count - 1 To 0 Step -1
  2146.            Unload Forms(F)
  2147.         Next F
  2148.         'close any open files
  2149.         If (Forms.Count = 0) Then Close
  2150.         'set all open forms to Nothing
  2151.         Set frmGameScreen = Nothing
  2152.     End If
  2153. End If
  2154. End Sub
  2155. Private Sub cmdAbort_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2156. txtStatus.ForeColor = vbGreen
  2157. txtStatus.Text = "Quit without saving"
  2158. End Sub
  2159. Private Sub cmdCleanup_Click()
  2160. 'detoxify planet contaminated by biorocket
  2161. Dim ResourceFlag As Boolean   'adds second line to msgbox, showing extra resources
  2162. Dim Q As Integer              'extra resources if currently < 2
  2163. 'added check for money
  2164. If Planet(ActivePlanet).Contaminated And Player(Current).BioCleanupResearched Then
  2165.     UnitCost = 10
  2166.     If Player(Current).NumResources >= UnitCost Then
  2167.         PlaySoundEffect "Button2"
  2168.         If MsgBox("Detoxify this planet?", vbYesNo, "") = vbYes Then
  2169.         'deduct cost of cleanup
  2170.         Player(Current).NumResources = Player(Current).NumResources - UnitCost
  2171.         UpdatePlayerStats
  2172.             Planet(ActivePlanet).Contaminated = False
  2173.             'add 1-2 resources if planet has < 2
  2174.             If Planet(ActivePlanet).Resources < 2 Then
  2175.                 'rejuvenate 1-2 resources
  2176.                 Randomize
  2177.                 Q = Int(Rnd * 1) + 1
  2178.                 Planet(ActivePlanet).Resources = Planet(ActivePlanet).Resources + Q
  2179.             End If
  2180.             Dim Msg As String
  2181.             Msg = "Planetary environment now suitable for Humans"
  2182.             If ResourceFlag Then
  2183.                 Msg = Msg + Chr(13) + "Resource Production increased to " + Str(Planet(ActivePlanet).Resources)
  2184.                 ResourceFlag = False
  2185.             End If
  2186.             PlaySoundEffect "Quiet"
  2187.             MsgBox Msg, , "Detoxification complete"
  2188.         
  2189.             'restore planet picture
  2190.             Select Case Planet(ActivePlanet).BackGround
  2191.             Case 1
  2192.                picPlanet(ActivePlanet).Picture = picPlanet1.Picture
  2193.             Case 2
  2194.                 picPlanet(ActivePlanet).Picture = picPlanet2.Picture
  2195.             Case 3
  2196.                 picPlanet(ActivePlanet).Picture = picPlanet3.Picture
  2197.             Case 4
  2198.                 picPlanet(ActivePlanet).Picture = picPlanet4.Picture
  2199.             Case 5
  2200.                 picPlanet(ActivePlanet).Picture = picPlanet5.Picture
  2201.             End Select
  2202.         
  2203.         End If
  2204.     Else
  2205.         'insufficient funds
  2206.         PlaySoundEffect "Quiet"
  2207.         MsgBox "Detoxification costs 10 resource units", vbExclamation, "Insufficient Resources"
  2208.     End If
  2209. End If
  2210. End Sub
  2211. Private Sub cmdCleanup_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2212. txtStatus.Text = "Detoxify Planet Contaminated By BioHazard"
  2213. End Sub
  2214. Private Sub cmdEndTurn_Click()
  2215. 'save the game
  2216. PlaySoundEffect "Button2"
  2217. If MsgBox("Save this turn?", vbYesNo + vbQuestion, "Ending Turn") = vbYes Then
  2218. 'advance ships on warp path if not landed
  2219. If Player(Current).Ship(0).WarpPosition = 8 Or Player(Current).Ship(1).WarpPosition = 8 Then
  2220.   'don't end turn until player lands ship
  2221.   PlaySoundEffect "Disintegrate"
  2222.   MsgBox "Your ship must land this turn", vbExclamation, "Warp Limit"
  2223.   Exit Sub
  2224. End If
  2225. 'confirm ending turn, then give message to player
  2226. Dim z As Integer
  2227. For z = 0 To 1
  2228.     If Player(Current).Ship(z).Launched Then
  2229.         Player(Current).Ship(z).WarpPosition = Player(Current).Ship(z).WarpPosition + 1
  2230.     End If
  2231. Next z
  2232. 'set it to the next turn if player 2 is finishing up
  2233. If Current = 1 Then
  2234.     TurnNumber = TurnNumber + 1
  2235. End If
  2236. 'turn off scanner
  2237. If ScannerOn Then
  2238.     cmdScan_Click
  2239.     ScannerOn = False
  2240.     cmdScan.Enabled = False
  2241. End If
  2242. 'save planet and player info to a file, then end
  2243. WriteBigFile
  2244. 'here's where zlib is used to compress the file just written
  2245. frmCompress.Show Modal
  2246. 'frmCompress calls frmContinue for choice of main menu or quit
  2247. 'if main menu, then this form is unloaded by frmContinue
  2248. End If
  2249. End Sub
  2250. Private Sub cmdEndTurn_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2251.   txtStatus.ForeColor = vbGreen
  2252.   txtStatus.Text = "End Turn, Prepare Information File for Upload"
  2253. End Sub
  2254. Private Sub cmdLandShip1_Click()
  2255. 'figure out which planets are available for landing
  2256. Dim Count As Integer
  2257. Dim x1, y1, X2, Y2
  2258. Dim a As Integer
  2259. Dim b As Integer
  2260. Dim Distance
  2261. Dim RangeLow, RangeHigh
  2262. Dim xpos, ypos, radius
  2263. 'set toggle state:
  2264. If ReadyToLand1 = True Then
  2265.     ReadyToLand1 = False
  2266. ElseIf ReadyToLand1 = False Then
  2267.     ReadyToLand1 = True
  2268. End If
  2269. If ReadyToLand1 Then
  2270.    cmdLandShip2.Enabled = False
  2271.    cmdPreviewShip1.Enabled = False
  2272.    cmdPreviewShip2.Enabled = False
  2273.    cmdPreviewEnemy1.Enabled = False
  2274.    cmdPreviewEnemy2.Enabled = False
  2275. ElseIf ReadyToLand1 = False Then
  2276.     If Player(Current).Ship(1).Launched Then
  2277.         cmdLandShip2.Enabled = True
  2278.     End If
  2279.     cmdPreviewShip1.Enabled = True
  2280.     cmdPreviewShip2.Enabled = True
  2281.     cmdPreviewEnemy1.Enabled = True
  2282.     cmdPreviewEnemy2.Enabled = True
  2283. End If
  2284. 'set activeship to appropriate ship number
  2285. activeship = 0
  2286. 'clear the board of any inrange settings
  2287. Dim z
  2288. For z = 0 To 49
  2289.     Planet(z).InRange = False
  2290. Next z
  2291. 'Check for UltraWarp and set ranges
  2292. If Player(Current).UltraWarpResearched Then
  2293.     'increased range
  2294.     RangeLow = Player(Current).Ship(0).WarpPosition * 250
  2295.     RangeHigh = RangeLow + 700
  2296. ElseIf Player(Current).UltraWarpResearched = False Then
  2297.     'lower ranges
  2298.     RangeLow = Player(Current).Ship(0).WarpPosition * 250
  2299.     RangeHigh = RangeLow + 350
  2300. End If
  2301. 'ship's starting position - originating planet
  2302. x1 = Player(Current).Ship(0).CenterX
  2303. y1 = Player(Current).Ship(0).CenterY
  2304. 'check distance from home planet to each other planet
  2305. 'if within the range, set planet's InRange to true
  2306. For Count = 0 To 49
  2307.     X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2308.     Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2309.     a = Abs(x1 - X2)
  2310.     b = Abs(y1 - Y2)
  2311.     Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2312.     If Distance >= RangeLow And Distance <= RangeHigh And picPlanet(Count).Visible Then
  2313.         'planet is within range - set value
  2314.         Planet(Count).InRange = True
  2315.     End If
  2316. Next Count
  2317. 'if in range, draw circle
  2318. For Count = 0 To 49
  2319.     If Planet(Count).InRange And picPlanet(Count).Visible Then
  2320.         'find center of the picturebox and draw circle
  2321.         xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2322.         ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2323.         radius = (picPlanet(Count).Width / 2) + 45
  2324.         picGalaxy.DrawMode = 7
  2325.         picGalaxy.DrawWidth = 1
  2326.         picGalaxy.Circle (xpos, ypos), radius, vbYellow
  2327.     End If
  2328. Next Count
  2329. End Sub
  2330. Private Sub cmdLandShip1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2331. txtStatus.Text = "Prepare Ship 1 for Attack/Landing"
  2332. End Sub
  2333. Private Sub cmdLandShip2_Click()
  2334. 'figure out which planets are available for landing
  2335. Dim Count As Integer
  2336. Dim x1, y1, X2, Y2
  2337. Dim a As Integer
  2338. Dim b As Integer
  2339. Dim Distance
  2340. Dim RangeLow, RangeHigh
  2341. Dim xpos, ypos, radius
  2342. 'set toggle state:
  2343. If ReadyToLand2 = True Then
  2344.     ReadyToLand2 = False
  2345. ElseIf ReadyToLand2 = False Then
  2346.     ReadyToLand2 = True
  2347. End If
  2348. If ReadyToLand2 Then
  2349.     cmdLandShip1.Enabled = False
  2350.     cmdPreviewShip1.Enabled = False
  2351.     cmdPreviewShip2.Enabled = False
  2352.     cmdPreviewEnemy1.Enabled = False
  2353.     cmdPreviewEnemy2.Enabled = False
  2354. ElseIf ReadyToLand2 = False Then
  2355.     '**see if other ship launched
  2356.     If Player(Current).Ship(0).Launched Then
  2357.         cmdLandShip1.Enabled = True
  2358.     End If
  2359.     cmdPreviewShip1.Enabled = True
  2360.     cmdPreviewShip2.Enabled = True
  2361.     cmdPreviewEnemy1.Enabled = True
  2362.     cmdPreviewEnemy2.Enabled = True
  2363. End If
  2364. 'set activeship to appropriate ship number
  2365. activeship = 1
  2366. 'clear the board of any inrange settings
  2367. Dim z
  2368. For z = 0 To 49
  2369.     Planet(z).InRange = False
  2370. Next z
  2371. 'Check for UltraWarp and set ranges
  2372. If Player(Current).UltraWarpResearched Then
  2373.     'increased range
  2374.     RangeLow = Player(Current).Ship(1).WarpPosition * 250
  2375.     RangeHigh = RangeLow + 700
  2376. ElseIf Player(Current).UltraWarpResearched = False Then
  2377.     'lower ranges
  2378.     RangeLow = Player(Current).Ship(1).WarpPosition * 250
  2379.     RangeHigh = RangeLow + 350
  2380. End If
  2381. 'ship's starting position - originating planet
  2382. x1 = Player(Current).Ship(1).CenterX
  2383. y1 = Player(Current).Ship(1).CenterY
  2384. 'check distance from home planet to each other planet
  2385. 'if within the range, set planet's InRange to true
  2386. For Count = 0 To 49
  2387.     X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2388.     Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2389.     a = Abs(x1 - X2)
  2390.     b = Abs(y1 - Y2)
  2391.     Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2392.     If Distance >= RangeLow And Distance <= RangeHigh Then
  2393.         'planet is within range - set value
  2394.         Planet(Count).InRange = True
  2395.    End If
  2396. Next Count
  2397. 'if in range, draw circle
  2398. For Count = 0 To 49
  2399.     If Planet(Count).InRange And picPlanet(Count).Visible Then
  2400.         'find center of the picturebox and draw circle
  2401.         xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2402.         ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2403.         radius = (picPlanet(Count).Width / 2) + 45
  2404.         picGalaxy.DrawMode = 7
  2405.         picGalaxy.DrawWidth = 1
  2406.         picGalaxy.Circle (xpos, ypos), radius, vbYellow
  2407.     End If
  2408. Next Count
  2409. End Sub
  2410. Private Sub cmdLandShip2_LostFocus()
  2411. 'EraseCircles
  2412. End Sub
  2413. Private Sub cmdLandShip2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2414. txtStatus.Text = "Prepare Ship 2 for Attack/Landing"
  2415. End Sub
  2416. Private Sub cmdLaunch_Click()
  2417. 'launch a ship
  2418. PlaySoundEffect "Button4"
  2419. 'check to see if a new planet - can't take off this turn
  2420. Dim msg1 As String
  2421. msg1 = "Engines being re-tooled after landing:" & Chr(13)
  2422. msg1 = msg1 + "Ship cannot launch this turn."
  2423. If Planet(ActivePlanet).JustLanded Then
  2424.     PlaySoundEffect "Quiet"
  2425.     MsgBox msg1, vbOKOnly + vbExclamation, "Operation Terminated"
  2426.     Exit Sub
  2427. ElseIf Player(Current).Ship(0).Launched And Player(Current).Ship(1).Launched Then
  2428.     PlaySoundEffect "Quiet"
  2429.     MsgBox "No ships available for launch", vbOKOnly, "Launch Cancelled"
  2430.     Exit Sub
  2431.     'load the launch form
  2432.     frmLaunch.Show Modal
  2433. End If
  2434. End Sub
  2435. Private Sub cmdLaunch_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2436. txtStatus.Text = "Prepare a ship for launch"
  2437. End Sub
  2438. Private Sub cmdLaunchBioRocket_Click()
  2439. 'launch biorocket - check if planets in range
  2440. PlaySoundEffect "Button4"
  2441. Dim Range
  2442. Dim x1, y1, X2, Y2
  2443. Dim Count
  2444. Dim a, b
  2445. Dim Distance
  2446. Dim RocketCost
  2447. RocketCost = 30
  2448. 'set toggle state:
  2449. If BioRocketOn = True Then
  2450.     BioRocketOn = False
  2451.     Planet(ActivePlanet).LaunchSite = False
  2452. ElseIf BioRocketOn = False Then
  2453.     BioRocketOn = True
  2454.     Planet(ActivePlanet).LaunchSite = True
  2455. End If
  2456. If Player(Current).BioRocketResearched And Player(Current).NumResources >= RocketCost Then
  2457.     'continue
  2458.     'set range
  2459.     If Player(Current).LongBioResearched Then
  2460.         Range = 1200
  2461.     Else
  2462.         Range = 750
  2463.     End If
  2464.     'clear the board of any inbiorange settings
  2465.     Dim z
  2466.     For z = 0 To 49
  2467.         Planet(z).InBioRange = False
  2468.     Next z
  2469.     'rocket's centre - originating planet
  2470.     x1 = picPlanet(ActivePlanet).Left + (picPlanet(ActivePlanet).Width / 2)
  2471.     y1 = picPlanet(ActivePlanet).Top + (picPlanet(ActivePlanet).Height / 2)
  2472.     'check distance from source planet to each other planet
  2473.     'if within the range and visible (ie. different galaxy sizes),
  2474.     'then set planet's InBioRange to true
  2475.     For Count = 0 To 49
  2476.        X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2477.        Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2478.        a = Abs(x1 - X2)
  2479.        b = Abs(y1 - Y2)
  2480.        Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2481.        If Distance <= Range And picPlanet(Count).Visible Then
  2482.           Planet(Count).InBioRange = True
  2483.           Planet(Count).BioDistance = Distance
  2484.        End If
  2485.     Next Count
  2486.     'Disallow targeting of planets you own
  2487.     For Count = 0 To 49
  2488.         If Planet(Count).Owner = Current Then
  2489.             Planet(Count).InBioRange = False
  2490.         End If
  2491.     Next Count
  2492.     'if in range and visible, draw line
  2493.     For Count = 0 To 49
  2494.         If Planet(Count).InBioRange And picPlanet(Count).Visible Then
  2495.             'find center of the picturebox and draw line
  2496.             X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2497.             Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2498.             picGalaxy.DrawWidth = 2
  2499.             picGalaxy.DrawMode = 7
  2500.             picGalaxy.Line (x1, y1)-(X2, Y2), vbMagenta
  2501.         End If
  2502.     Next Count
  2503.         
  2504.     'not enough money, or don't have technology
  2505.     PlaySoundEffect "Quiet"
  2506.     MsgBox "Insufficient funds - BioHazard Rockets" + Chr(13) + "cost 30 resource units each", vbOKOnly + vbInformation, "Launch Cancelled"
  2507.     Exit Sub
  2508. End If
  2509. End Sub
  2510. Private Sub cmdLaunchBioRocket_LostFocus()
  2511. 'EraseLines (ActivePlanet)
  2512. End Sub
  2513. Private Sub cmdLaunchBioRocket_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2514. txtStatus.Text = "Launch BioHazard Rocket"
  2515. End Sub
  2516. Private Sub cmdOK_Click()
  2517. 'put the purchase order through
  2518. 'and update the player and planet stats
  2519. 'uses horizontal scroll bar hsbQuantity to set # of units purchased
  2520. PlaySoundEffect "Button1"
  2521. Select Case lblItemName.Caption
  2522. Case "Missile Defences"
  2523.      'Buy missile defenses for planet
  2524.      'Cost: 10, Adds 5 to combatstrength
  2525.      'exit sub if planet already has missiles
  2526.      If Planet(ActivePlanet).HaveMissiles Then
  2527.         Exit Sub
  2528.      End If
  2529.      
  2530.      Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2531.      UpdatePlayerStats
  2532.      
  2533.      'add to planet's combatstrength if hsbquantity >0
  2534.      If hsbQuantity.Value > 0 Then
  2535.          Planet(ActivePlanet).HaveMissiles = True
  2536.          SetCombatStrength (ActivePlanet)
  2537.      End If
  2538.      
  2539. Case "Planetary Shield"
  2540.      'Buy shield defense for planet
  2541.      'Cost:20, Adds 25 to combatstrength
  2542.      Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2543.      UpdatePlayerStats
  2544.      
  2545.      'add to planet's combatstrength if hsbquantity>0
  2546.      If hsbQuantity.Value > 0 Then
  2547.         Planet(ActivePlanet).HaveShields = True
  2548.         SetCombatStrength (ActivePlanet)
  2549.      End If
  2550.        
  2551. Case "Troops"
  2552.     'update #troops for player and for planet
  2553.     Player(Current).NumTroops = Player(Current).NumTroops + Quantity
  2554.     Planet(ActivePlanet).Troops = Planet(ActivePlanet).Troops + Quantity
  2555.     Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2556.     'call update procedure
  2557.     UpdatePlayerStats
  2558.     SetCombatStrength (ActivePlanet)
  2559. Case "Assault Mechs"
  2560.     'update #assault troops for player and planet
  2561.     Player(Current).NumAssaultTroops = Player(Current).NumAssaultTroops + Quantity
  2562.     Planet(ActivePlanet).AssaultTroops = Planet(ActivePlanet).AssaultTroops + Quantity
  2563.     Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2564.     'call update procedure
  2565.     UpdatePlayerStats
  2566.     SetCombatStrength (ActivePlanet)
  2567.      
  2568. Case "Improved Resource Production"
  2569.      'Increase planet's resource production
  2570.      'Cost: 15, Adds random 2-5 to planet's resources
  2571.      
  2572.      'set flag that this planet has improved resources if hsbquantity>0
  2573.      If hsbQuantity.Value > 0 Then
  2574.         'add to planet's resources
  2575.          Dim Increase As Integer
  2576.          Increase = Int(Rnd * 3) + 2
  2577.          Planet(ActivePlanet).Resources = Planet(ActivePlanet).Resources + Increase
  2578.          'set improved flag
  2579.          Planet(ActivePlanet).ImprovedResources = True
  2580.          'charge the player
  2581.          Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2582.          UpdatePlayerStats
  2583.      End If
  2584.      
  2585. Case "Scanner"
  2586.      'Cost: 25, lets player see detailed info on surrounding planets
  2587.      Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2588.      UpdatePlayerStats
  2589.      'set flag that this planet has scanner
  2590.      '***if quantity=1
  2591.      If hsbQuantity.Value > 0 Then
  2592.          Planet(ActivePlanet).HaveScanner = True
  2593.      End If
  2594.      
  2595. Case "Scanner Jamming Device"
  2596.      'Cost: 15
  2597.      'PurchasePrice = 15
  2598.      Player(Current).NumResources = Player(Current).NumResources - PurchasePrice
  2599.      UpdatePlayerStats
  2600.      'set flag that this planet has scanner jamming device
  2601.      If hsbQuantity.Value > 0 Then
  2602.          Planet(ActivePlanet).HaveJammer = True
  2603.      End If
  2604. End Select
  2605. 'reset the scroll bar and labels
  2606. cmdLaunch.Enabled = False
  2607. ClearFrame
  2608. 'disable landing frame only if no ships launched
  2609. If Player(Current).Ship(0).Launched = False And Player(Current).Ship(1).Launched = False Then
  2610.     fraLanding.Enabled = False
  2611. End If
  2612. End Sub
  2613. Private Sub cmdPlanetName_Click()
  2614. 'go to the landscape view
  2615. frmLandscape.Show Modal
  2616. End Sub
  2617. Private Sub cmdPlanetName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2618. txtStatus.Text = "Click here to view the planet"
  2619. End Sub
  2620. Private Sub cmdPreviewEnemy1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2621. 'figure out which planets are available for enemy landing next turn
  2622. 'exit sub if warp scanner not researched
  2623. If Player(Current).WarpScannerResearched = False Then
  2624.     'don't do the preview at all
  2625.     PlaySoundEffect "Quiet"
  2626.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2627.     Exit Sub
  2628. End If
  2629. '***********************
  2630. 'In form_activate, there is a base 98% chance of a cloaked ship staying hidden.
  2631. 'If the current player has the warp scanner, there is an 75% chance, +/- 5%, of remaining
  2632. 'hidden.  I'm not sure if that's too high...
  2633. 'Either the chance of being hidden in the first place is reduced if the player
  2634. 'has a warp scanner (ie. by 50%), or I have to recalculate the chance of successfully
  2635. 'previewing the ship's landing sites here.
  2636. '***********************
  2637. If Player(Other).Ship(0).HaveCloakingDevice And Player(Other).Ship(0).Hidden Then
  2638.     'don't do the preview at all
  2639.     PlaySoundEffect "Quiet"
  2640.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2641.     Exit Sub
  2642. End If
  2643. 'first, see if there's a ship in the warp path
  2644. If Player(Other).Ship(0).Launched Then
  2645. Dim Count As Integer
  2646. Dim x1, y1, X2, Y2
  2647. Dim a As Integer
  2648. Dim b As Integer
  2649. Dim Distance
  2650. Dim RangeLow, RangeHigh
  2651. Dim xpos, ypos, radius
  2652. 'clear the board of any inrange settings
  2653. Dim z
  2654. For z = 0 To 49
  2655.     Planet(z).InRange = False
  2656. Next z
  2657. 'Check for UltraWarp and set ranges
  2658. If Player(Other).UltraWarpResearched Then
  2659.     'increased range
  2660.     RangeLow = Player(Other).Ship(0).WarpPosition * 250
  2661.     RangeHigh = RangeLow + 700
  2662. ElseIf Player(Other).UltraWarpResearched = False Then
  2663.     'lower ranges
  2664.     RangeLow = Player(Other).Ship(0).WarpPosition * 250
  2665.     RangeHigh = RangeLow + 350
  2666. End If
  2667. 'ship's starting position - originating planet
  2668. x1 = Player(Other).Ship(0).CenterX
  2669. y1 = Player(Other).Ship(0).CenterY
  2670. For Count = 0 To 49
  2671.     'check distance from home planet to each other planet
  2672.     'if within the range, set planet's InRange to true
  2673.     'use centre of planets, not top left corner
  2674.     X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2675.     Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2676.     a = Abs(x1 - X2)
  2677.     b = Abs(y1 - Y2)
  2678.     Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2679.     If Distance >= RangeLow And Distance <= RangeHigh And picPlanet(Count).Visible Then
  2680.         'planet is within range - set value
  2681.         Planet(Count).InRange = True
  2682.         'find center of the picturebox and draw circle
  2683.         xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2684.         ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2685.         radius = (picPlanet(Count).Width / 2) + 45
  2686.         'set drawmode
  2687.         picGalaxy.DrawMode = 7
  2688.         picGalaxy.DrawWidth = 1
  2689.         picGalaxy.Circle (xpos, ypos), radius, vbRed
  2690.     End If
  2691. Next Count
  2692. 'if no ship in the warp path, error message
  2693.    PlaySoundEffect "Quiet"
  2694.    MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2695. End If
  2696. End Sub
  2697. Private Sub cmdPreviewEnemy1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2698. 'redraw the circles to erase them
  2699. 'if cloaked, don't do this routine at all
  2700. If Player(Other).Ship(0).HaveCloakingDevice And Player(Other).Ship(0).Hidden Then
  2701.     'don't do the preview at all
  2702.     Exit Sub
  2703. End If
  2704. Dim xpos, ypos, radius
  2705. Dim z
  2706.     For z = 0 To 49
  2707.     If Planet(z).InRange And picPlanet(z).Visible Then
  2708.         'find center of the picturebox and draw circle
  2709.         xpos = picPlanet(z).Left + (picPlanet(z).Width / 2)
  2710.         ypos = picPlanet(z).Top + (picPlanet(z).Height / 2)
  2711.         radius = (picPlanet(z).Width / 2) + 45
  2712.         'set drawmode
  2713.         picGalaxy.DrawMode = 7
  2714.         picGalaxy.DrawWidth = 1
  2715.         picGalaxy.Circle (xpos, ypos), radius, vbRed
  2716.     End If
  2717.     Next z
  2718. End Sub
  2719. Private Sub cmdPreviewEnemy2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2720. 'figure out which planets are available for enemy landing next turn
  2721. 'exit sub if warp scanner not researched
  2722. If Player(Current).WarpScannerResearched = False Then
  2723.     'don't do the preview at all
  2724.     PlaySoundEffect "Quiet"
  2725.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2726.     Exit Sub
  2727. End If
  2728. If Player(Other).Ship(1).HaveCloakingDevice And Player(Other).Ship(1).Hidden Then
  2729.     'don't do the preview at all
  2730.     PlaySoundEffect "Quiet"
  2731.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2732.     Exit Sub
  2733. End If
  2734. If Player(Other).Ship(1).Launched Then
  2735. Dim Count As Integer
  2736. Dim x1, y1, X2, Y2
  2737. Dim a As Integer
  2738. Dim b As Integer
  2739. Dim Distance
  2740. Dim RangeLow, RangeHigh
  2741. Dim xpos, ypos, radius
  2742. 'clear the board of any inrange settings
  2743. Dim z
  2744. For z = 0 To 49
  2745.     Planet(z).InRange = False
  2746. Next z
  2747. 'Check for UltraWarp and set ranges
  2748. If Player(Other).UltraWarpResearched Then
  2749.     'increased range
  2750.     RangeLow = Player(Other).Ship(1).WarpPosition * 250
  2751.     RangeHigh = RangeLow + 700
  2752. ElseIf Player(Other).UltraWarpResearched = False Then
  2753.     'lower ranges
  2754.     RangeLow = Player(Other).Ship(1).WarpPosition * 250
  2755.     RangeHigh = RangeLow + 350
  2756. End If
  2757. 'ship's starting position - originating planet
  2758. x1 = Player(Other).Ship(1).CenterX
  2759. y1 = Player(Other).Ship(1).CenterY
  2760. For Count = 0 To 49
  2761.     'check distance from home planet to each other planet
  2762.     'if within the range, set planet's InRange to true
  2763.     'use centre of planets, not top left corner
  2764.     X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2765.     Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2766.     a = Abs(x1 - X2)
  2767.     b = Abs(y1 - Y2)
  2768.     Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2769.     If Distance >= RangeLow And Distance <= RangeHigh And picPlanet(Count).Visible Then
  2770.         'planet is within range - set value
  2771.         Planet(Count).InRange = True
  2772.         'find center of the picturebox and draw circle
  2773.         xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2774.         ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2775.         radius = (picPlanet(Count).Width / 2) + 45
  2776.         'set drawmode
  2777.         picGalaxy.DrawMode = 7
  2778.         picGalaxy.DrawWidth = 1
  2779.         picGalaxy.Circle (xpos, ypos), radius, vbRed
  2780.     End If
  2781. Next Count
  2782.    PlaySoundEffect "Quiet"
  2783.    MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2784. End If
  2785. End Sub
  2786. Private Sub cmdPreviewEnemy2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2787. 'redraw the circles to erase them
  2788. 'if cloaked, don't do this routine at all
  2789. If Player(Other).Ship(1).HaveCloakingDevice And Player(Other).Ship(1).Hidden Then
  2790.     'don't do the preview at all
  2791.     Exit Sub
  2792. End If
  2793. Dim xpos, ypos, radius
  2794. Dim z
  2795.     For z = 0 To 49
  2796.     If Planet(z).InRange And picPlanet(z).Visible Then
  2797.         'find center of the picturebox and draw circle
  2798.         xpos = picPlanet(z).Left + (picPlanet(z).Width / 2)
  2799.         ypos = picPlanet(z).Top + (picPlanet(z).Height / 2)
  2800.         radius = (picPlanet(z).Width / 2) + 45
  2801.         'set drawmode
  2802.         picGalaxy.DrawMode = 7
  2803.         picGalaxy.DrawWidth = 1
  2804.         picGalaxy.Circle (xpos, ypos), radius, vbRed
  2805.     End If
  2806.     Next z
  2807. End Sub
  2808. Private Sub cmdPreviewShip1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2809. 'figure out which planets are available for landing
  2810. Dim NumPlanetsInRange As Integer   'if none, tell player
  2811. If Player(Current).Ship(0).Launched Then
  2812.     'figure out which planets are available for landing
  2813.     Dim Count As Integer
  2814.     Dim x1, y1, X2, Y2
  2815.     Dim a As Integer
  2816.     Dim b As Integer
  2817.     Dim Distance
  2818.     Dim RangeLow, RangeHigh
  2819.     Dim xpos, ypos, radius
  2820.     'set activeship to appropriate ship number
  2821.     activeship = 0
  2822.     'clear the board of any inrange settings
  2823.     Dim z
  2824.     For z = 0 To 49
  2825.         Planet(z).InRange = False
  2826.     Next z
  2827. 'Check for UltraWarp and set ranges
  2828.     If Player(Current).UltraWarpResearched Then
  2829.         'increased range
  2830.         RangeLow = Player(Current).Ship(0).WarpPosition * 250
  2831.         RangeHigh = RangeLow + 700
  2832.     ElseIf Player(Current).UltraWarpResearched = False Then
  2833.         'lower ranges
  2834.         RangeLow = Player(Current).Ship(0).WarpPosition * 250
  2835.         RangeHigh = RangeLow + 350
  2836.     End If
  2837.     'ship's starting position - originating planet
  2838.     x1 = Player(Current).Ship(0).CenterX
  2839.     y1 = Player(Current).Ship(0).CenterY
  2840.     'check distance from home planet to each other planet
  2841.     'if within the range, set planet's InRange to true
  2842.     For Count = 0 To 49
  2843.         'use centre of planets, not top left corner
  2844.         X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2845.         Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2846.         a = Abs(x1 - X2)
  2847.         b = Abs(y1 - Y2)
  2848.         Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2849.         If Distance >= RangeLow And Distance <= RangeHigh Then
  2850.             'planet is within range - set value
  2851.             Planet(Count).InRange = True
  2852.             NumPlanetsInRange = NumPlanetsInRange + 1
  2853.         End If
  2854.     Next Count
  2855.     If NumPlanetsInRange = 0 Then
  2856.         PlaySoundEffect "Quiet"
  2857.         MsgBox "No planets in range this turn", vbOKOnly + vbInformation, "Attempting to Land Ship 1"
  2858.         Exit Sub
  2859.     End If
  2860.     'if in range, draw circle
  2861.     For Count = 0 To 49
  2862.         If Planet(Count).InRange And picPlanet(Count).Visible Then
  2863.             'find center of the picturebox and draw circle
  2864.             xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2865.             ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2866.             radius = (picPlanet(Count).Width / 2) + 45
  2867.             picGalaxy.DrawMode = 7
  2868.             picGalaxy.DrawWidth = 1
  2869.             picGalaxy.Circle (xpos, ypos), radius, vbYellow
  2870.         End If
  2871.     Next Count
  2872.     'ship not launched
  2873.     PlaySoundEffect "Quiet"
  2874.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2875. End If
  2876. End Sub
  2877. Private Sub cmdPreviewShip1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2878. txtStatus.Text = ""
  2879. End Sub
  2880. Private Sub cmdPreviewShip1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2881. 'redraw the circles to erase them
  2882. EraseCircles
  2883. End Sub
  2884. Private Sub cmdPreviewShip2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2885. 'figure out which planets are available for landing
  2886. Dim NumPlanetsInRange As Integer   'if none, tell player
  2887. If Player(Current).Ship(1).Launched Then
  2888. 'figure out which planets are available for landing
  2889. Dim Count As Integer
  2890. Dim x1, y1, X2, Y2
  2891. Dim a As Integer
  2892. Dim b As Integer
  2893. Dim Distance
  2894. Dim RangeLow, RangeHigh
  2895. Dim xpos, ypos, radius
  2896. 'set activeship to appropriate ship number
  2897.     activeship = 1
  2898. 'clear the board of any inrange settings
  2899.     Dim z
  2900.     For z = 0 To 49
  2901.         Planet(z).InRange = False
  2902.     Next z
  2903. 'Check for UltraWarp and set ranges
  2904. If Player(Current).UltraWarpResearched Then
  2905.     'increased range
  2906.     RangeLow = Player(Current).Ship(1).WarpPosition * 250
  2907.     RangeHigh = RangeLow + 700
  2908. ElseIf Player(Current).UltraWarpResearched = False Then
  2909.     'lower ranges
  2910.     RangeLow = Player(Current).Ship(1).WarpPosition * 250
  2911.     RangeHigh = RangeLow + 350
  2912. End If
  2913. 'ship's starting position - originating planet
  2914.     x1 = Player(Current).Ship(1).CenterX
  2915.     y1 = Player(Current).Ship(1).CenterY
  2916. 'check distance from home planet to each other planet
  2917. 'if within the range, set planet's InRange to true
  2918.         For Count = 0 To 49
  2919.             X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2920.             Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2921.             a = Abs(x1 - X2)
  2922.             b = Abs(y1 - Y2)
  2923.             Distance = Int(Sqr(a ^ 2 + b ^ 2))
  2924.             If Distance >= RangeLow And Distance <= RangeHigh Then
  2925.                 'planet is within range - set value
  2926.                 Planet(Count).InRange = True
  2927.                 NumPlanetsInRange = NumPlanetsInRange + 1
  2928.             End If
  2929.         Next Count
  2930.     If NumPlanetsInRange = 0 Then
  2931.         PlaySoundEffect "Quiet"
  2932.         MsgBox "No planets in range this turn", vbOKOnly + vbInformation, "Attempting to Land Ship 2"
  2933.         Exit Sub
  2934.     End If
  2935.     'if in range, draw circle
  2936.     For Count = 0 To 49
  2937.         If Planet(Count).InRange And picPlanet(Count).Visible Then
  2938.             'find center of the picturebox and draw circle
  2939.             xpos = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  2940.             ypos = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  2941.             radius = (picPlanet(Count).Width / 2) + 45
  2942.             picGalaxy.DrawMode = 7
  2943.             picGalaxy.DrawWidth = 1
  2944.             picGalaxy.Circle (xpos, ypos), radius, vbYellow
  2945.         End If
  2946.     Next Count
  2947.     PlaySoundEffect "Quiet"
  2948.     MsgBox "No landing data available", vbInformation + vbOKOnly, "Probe Error"
  2949. End If
  2950. End Sub
  2951. Private Sub cmdPreviewShip2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2952. txtStatus.Text = ""
  2953. End Sub
  2954. Private Sub cmdPreviewShip2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2955. 'redraw the circles to erase them
  2956. EraseCircles
  2957. End Sub
  2958. Private Sub cmdRegenerate_Click()
  2959. 'Regenerate planet after detoxification, after biorocket damage
  2960. If Planet(ActivePlanet).NukedResources And Player(Current).RegenerationResearched Then
  2961.     'check if enough money
  2962.     UnitCost = 15   'defined globally in .bas module
  2963.     If Player(Current).NumResources >= UnitCost Then
  2964.         'continue
  2965.         PlaySoundEffect "Button2"
  2966.         If MsgBox("Regenerate this planet?", vbYesNo, "") = vbYes Then
  2967.            'deduct cost
  2968.             Player(Current).NumResources = Player(Current).NumResources - UnitCost
  2969.             UpdatePlayerStats
  2970.             Randomize
  2971.             Dim Num
  2972.             Num = Int(Rnd * 3) + 2
  2973.             
  2974.             Planet(ActivePlanet).Resources = Planet(ActivePlanet).Resources + Num
  2975.             
  2976.             If Planet(ActivePlanet).Resources > 8 Then
  2977.                 Planet(ActivePlanet).Resources = 8
  2978.             End If
  2979.             
  2980.             PlaySoundEffect "Quiet"
  2981.             MsgBox "Resource regeneration successful." + Chr(13) + "Production Capacity Now" + Str(Planet(ActivePlanet).Resources) + " Resources/Turn", , "Regeneration Complete"
  2982.             Planet(ActivePlanet).NukedResources = False
  2983.         End If
  2984.     Else
  2985.         'insufficient funds
  2986.         PlaySoundEffect "Quiet"
  2987.         MsgBox "Regeneration costs 15 resource units", vbExclamation, "Insufficient Resources"
  2988.     End If
  2989. End If
  2990. End Sub
  2991. Private Sub cmdRegenerate_LostFocus()
  2992. RegenerateOn = False
  2993. End Sub
  2994. Private Sub cmdRegenerate_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2995. txtStatus.Text = "Regenerate Barren Planet's Resource Capacity"
  2996. End Sub
  2997. Private Sub cmdRepairIndustry_Click()
  2998. 'start by checking for enough money - cost of 10-15
  2999. 'if not enough, msgbox saying what it costs, then exit sub
  3000. 'else, do the rest
  3001. Dim Msg As String  'for msgbox
  3002. If Planet(ActivePlanet).Damaged Then
  3003.     'check if enough money
  3004.     UnitCost = 10   'defined globally in .bas module
  3005.     If Player(Current).NumResources >= UnitCost Then
  3006.         'deduct cost of repairs
  3007.         Player(Current).NumResources = Player(Current).NumResources - UnitCost
  3008.         UpdatePlayerStats
  3009.         
  3010.         'add 2-3 resources
  3011.         Dim Repairs As Integer
  3012.         Randomize
  3013.         Repairs = Int(Rnd * 1) + 2
  3014.         'add repairs to planet's resources
  3015.         Planet(ActivePlanet).Resources = Planet(ActivePlanet).Resources + Repairs
  3016.         'ceiling of 8 resources
  3017.         If Planet(ActivePlanet).Resources > 8 Then
  3018.             Planet(ActivePlanet).Resources = 8
  3019.         End If
  3020.         If Planet(ActivePlanet).Resources > 3 Then
  3021.             'msgbox showing amt of improvement, and that further improvements need factory
  3022.             Msg = "Resource Production on " + Planet(ActivePlanet).Name + " increased by" + Str(Repairs) + " to" + Str(Planet(ActivePlanet).Resources) + " units" + Chr(13)
  3023.             Msg = Msg + "Further improvements require an Advanced Resource Production Facility"
  3024.             PlaySoundEffect "Quiet"
  3025.             MsgBox Msg, , "Industry Repair Results"
  3026.             
  3027.             'set Damaged ppty to false to prevent further repairs
  3028.             Planet(ActivePlanet).Damaged = False
  3029.             cmdRepairIndustry.Enabled = False
  3030.             
  3031.         Else
  3032.             'msgbox showing amt of improvement, and further repairs are ok
  3033.             Msg = "Resource Production on " + Planet(ActivePlanet).Name + " increased by" + Str(Repairs) + " to" + Str(Planet(ActivePlanet).Resources) + " units" + Chr(13)
  3034.             Msg = Msg + "Further repairs are possible."
  3035.             PlaySoundEffect "Quiet"
  3036.             MsgBox Msg, , "Industry Repair Results"
  3037.         End If
  3038.     Else
  3039.         PlaySoundEffect "Quiet"
  3040.         MsgBox "Repairs cost 10 resource units", vbExclamation, "Insufficient Resources"
  3041.     End If
  3042.      
  3043. End If
  3044. End Sub
  3045. Private Sub cmdScan_Click()
  3046. 'figure out which planets are in scanner range
  3047. 'draw red circle, allow full details in mousemove
  3048. PlaySoundEffect "Button4"
  3049. Dim Count As Integer
  3050. Dim x1, y1, X2, Y2
  3051. Dim a As Integer
  3052. Dim b As Integer
  3053. Dim Distance
  3054. Dim Range
  3055. Dim xpos, ypos, radius
  3056. 'set toggle
  3057. If ScannerOn = True Then
  3058.     ScannerOn = False
  3059. ElseIf ScannerOn = False Then
  3060.     ScannerOn = True
  3061. End If
  3062. 'if scanner on, turn off buttons that screw things up
  3063. If ScannerOn Then
  3064.     cmdPreviewShip1.Enabled = False
  3065.     cmdPreviewShip2.Enabled = False
  3066.     cmdPreviewEnemy1.Enabled = False
  3067.     cmdPreviewEnemy2.Enabled = False
  3068.     cmdLandShip1.Enabled = False
  3069.     cmdLandShip2.Enabled = False
  3070. ElseIf ScannerOn = False Then
  3071.     cmdPreviewShip1.Enabled = True
  3072.     cmdPreviewShip2.Enabled = True
  3073.     cmdPreviewEnemy1.Enabled = True
  3074.     cmdPreviewEnemy2.Enabled = True
  3075.     If Player(Current).Ship(0).Launched Then
  3076.         cmdLandShip1.Enabled = True
  3077.     End If
  3078.     If Player(Current).Ship(1).Launched Then
  3079.         cmdLandShip2.Enabled = True
  3080.     End If
  3081. End If
  3082. 'clear the board of any inrange settings
  3083. Dim z
  3084. For z = 0 To 49
  3085.    Planet(z).InScannerRange = False
  3086. Next z
  3087. 'set range
  3088. If Player(Current).DeepScannerResearched Then
  3089.     Range = 1800
  3090.     Range = 1200
  3091. End If
  3092. 'scanner's centre - originating planet
  3093. x1 = picPlanet(ActivePlanet).Left + (picPlanet(ActivePlanet).Width / 2)
  3094. y1 = picPlanet(ActivePlanet).Top + (picPlanet(ActivePlanet).Height / 2)
  3095. 'check distance from home planet to each other planet
  3096. 'if within the range, set planet's InRange to true
  3097. For Count = 0 To 49
  3098.    X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  3099.    Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  3100.    a = Abs(x1 - X2)
  3101.    b = Abs(y1 - Y2)
  3102.    Distance = Int(Sqr(a ^ 2 + b ^ 2))
  3103.    If Distance <= Range Then
  3104.    'check for jammer, or set as in range
  3105.         If Planet(Count).HaveJammer Then
  3106.             Planet(Count).InScannerRange = False
  3107.         ElseIf Planet(Count).HaveJammer = False Then
  3108.            Planet(Count).InScannerRange = True
  3109.         End If
  3110.    End If
  3111. Next Count
  3112. 'draw red circle showing range of scanner
  3113. radius = Range
  3114. picGalaxy.DrawMode = 7
  3115. picGalaxy.Circle (x1, y1), radius, vbRed
  3116. End Sub
  3117. Private Sub cmdScan_LostFocus()
  3118. '**getting rid of this seems to clear up some conflict
  3119. 'between the scanner and the landing buttons...
  3120. 'scanner gets turned off when a foreign planet is clicked.
  3121. 'cmdScan_Click
  3122. 'clear the board of any inrange settings
  3123. 'Dim z As Integer
  3124. 'For z = 0 To 49
  3125. '   Planet(z).InScannerRange = False
  3126. 'Next z
  3127. End Sub
  3128. Private Sub cmdViewSend_Click()
  3129. 'play monitor sound
  3130. PlaySoundEffect "Button3"
  3131. '***see if ships being landed, if so, turn them off
  3132. If ReadyToLand1 Then
  3133.     cmdLandShip1_Click
  3134. End If
  3135. If ReadyToLand2 Then
  3136.     cmdLandShip2_Click
  3137. End If
  3138. 'bring up the message console form
  3139. frmMessageConsole.Show Modal
  3140. 'turn off scanner
  3141. If ScannerOn Then
  3142.     cmdScan_Click
  3143.     ScannerOn = False
  3144.     cmdScan.Enabled = False
  3145. End If
  3146. End Sub
  3147. Private Sub cmdViewSend_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3148. txtStatus.Text = "View or Send Messages"
  3149. End Sub
  3150. Private Sub Form_Activate()
  3151. 'set value of cmdland1 and 2 toggles:
  3152. ReadyToLand1 = False
  3153. ReadyToLand2 = False
  3154. 'put player number under owned planets
  3155. Dim Count As Integer
  3156. For Count = 0 To 49
  3157.     If Planet(Count).Owner = Current Then
  3158.         picGalaxy.CurrentX = picPlanet(Count).Left + (picPlanet(Count).Width / 2) - 25
  3159.         picGalaxy.CurrentY = picPlanet(Count).Top + picPlanet(Count).Height + 15
  3160.         picGalaxy.ForeColor = vbYellow
  3161.         picGalaxy.Print Str(Current + 1)
  3162.     ElseIf Planet(Count).Owner = Other Then
  3163.         picGalaxy.CurrentX = picPlanet(Count).Left + (picPlanet(Count).Width / 2) - 25
  3164.         picGalaxy.CurrentY = picPlanet(Count).Top + picPlanet(Count).Height + 15
  3165.         picGalaxy.ForeColor = vbRed
  3166.         picGalaxy.Print Str(Other + 1)
  3167.     End If
  3168. Next Count
  3169. 'put ships on the warp path with coordinates printed below
  3170. '*****
  3171. RefreshWarpPath
  3172. '*****
  3173. Dim z     'counter
  3174. Dim j, k  'hold warp positions - easier to type & read
  3175. For z = 0 To 1
  3176.     If Player(Other).Ship(z).Launched Then
  3177.         k = Player(Other).Ship(z).WarpPosition
  3178.        
  3179.         If Player(Other).Ship(z).HaveCloakingDevice And CloakingChecked(z) = False Then
  3180.             '
  3181.             '******see if ship is hidden*********
  3182.             Randomize
  3183.             Dim ChanceOfHiding As Integer
  3184.             Dim Result
  3185.             
  3186.             ChanceOfHiding = 98 'set base chance of being hidden
  3187.             
  3188.             'chance lowered if current player has the warp scanner
  3189.             If Player(Current).WarpScannerResearched Then
  3190.                 ChanceOfHiding = 75
  3191.                 ChanceOfHiding = ChanceOfHiding + Int(Rnd * 5)
  3192.                 ChanceOfHiding = ChanceOfHiding - Int(Rnd * 5)
  3193.             End If
  3194.             
  3195.             Result = Int(Rnd * 100) + 1
  3196.             
  3197.             If Result <= ChanceOfHiding Then
  3198.                 'don't show picture on path
  3199.                 Debug.Print "Chance of hiding: ", ChanceOfHiding, "greater than/equal to Result: ", Result, "therefore, NOT showing"
  3200.                 Player(Other).Ship(z).Hidden = True
  3201.                 CloakingChecked(z) = True
  3202.             Else
  3203.                 'ship is not hidden this turn
  3204.                 Player(Other).Ship(z).Hidden = False
  3205.                 Debug.Print "Chance: ", ChanceOfHiding, "Result: ", Result, "NOT HIDDEN!"
  3206.                 
  3207.                 'show picture
  3208.                 picEnemyPath(k - 1).Picture = picTemp.Picture
  3209.                 'set cursor at bottom right corner
  3210.                 picEnemyPath(k - 1).CurrentX = 290
  3211.                 picEnemyPath(k - 1).CurrentY = 425
  3212.                 picEnemyPath(k - 1).Print Player(Other).Ship(z).Coordinate
  3213.                 CloakingChecked(z) = True
  3214.             End If
  3215.         Else
  3216.             'put picture on enemy path - IF NOT HIDDEN!!
  3217.             If Player(Other).Ship(z).Hidden = False Then
  3218.                 picEnemyPath(k - 1).Picture = picTemp.Picture
  3219.                 'set cursor at bottom right corner
  3220.                 picEnemyPath(k - 1).CurrentX = 290
  3221.                 picEnemyPath(k - 1).CurrentY = 425
  3222.                 picEnemyPath(k - 1).Print Player(Other).Ship(z).Coordinate
  3223.             End If
  3224.         End If
  3225.         
  3226.     End If
  3227. Next z
  3228. 'enable the landing frame if either ship is in warp
  3229. If Player(Current).Ship(0).Launched Or Player(Current).Ship(1).Launched Then
  3230.     fraLanding.Enabled = True
  3231. End If
  3232. 'enable the landing buttons if ships are launched
  3233. If Player(Current).Ship(0).Launched Then
  3234.    cmdLandShip1.Enabled = True
  3235. End If
  3236. If Player(Current).Ship(1).Launched Then
  3237.   cmdLandShip2.Enabled = True
  3238. End If
  3239. 'enable the preview buttons
  3240. cmdPreviewShip1.Enabled = True
  3241. cmdPreviewShip2.Enabled = True
  3242. cmdPreviewEnemy1.Enabled = True
  3243. cmdPreviewEnemy2.Enabled = True
  3244. '********************************
  3245. 'check for contamination - set picture
  3246. Dim h
  3247. For h = 0 To 49
  3248.     If Planet(h).Contaminated Then
  3249.         picPlanet(h).Cls
  3250.         picPlanet(h).Picture = picNuclear.Picture
  3251.     End If
  3252. Next h
  3253. 'Check for Contaminated Planets - damage done every turn humans on planet
  3254. Dim X As Integer
  3255. If ContaminationWarningGiven = False Then
  3256.     For X = 0 To 49
  3257.       If Planet(X).Owner = Current And Planet(X).Contaminated Then
  3258.         'figure out damage
  3259.         BioDamage (X)
  3260.         ContaminationWarningGiven = True
  3261.       End If
  3262.     Next X
  3263. End If
  3264. 'unload cover form
  3265. Unload frmCover
  3266. End Sub
  3267. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  3268. 'trap the function keys
  3269. Select Case KeyCode
  3270.     Case vbKeyEscape
  3271.         'show quick help screen
  3272.         PlaySoundEffect "Button3"
  3273.         'call sub from Declare.bas
  3274.         ShowQuickHelp
  3275.         
  3276.     Case vbKeyF2
  3277.         'Save game and exit
  3278.         cmdEndTurn.Value = True
  3279.         
  3280.     Case vbKeyF3
  3281.         'Exit without saving
  3282.         cmdAbort.Value = True
  3283.         
  3284.     Case vbKeyF4
  3285.         'toggle grid lines
  3286.         If GridLinesOn = False Then
  3287.             DrawGridLines
  3288.             GridLinesOn = True
  3289.         ElseIf GridLinesOn = True Then
  3290.             EraseGridLines
  3291.             GridLinesOn = False
  3292.         End If
  3293.         
  3294.     Case vbKeyF5
  3295.         'toggle sound
  3296.         If SoundOn = False Then
  3297.             SoundOn = True
  3298.         ElseIf SoundOn = True Then
  3299.             SoundOn = False
  3300.         End If
  3301.         
  3302.     Case vbKeyF6
  3303.         
  3304.         PlaySoundEffect "Button3"
  3305.         If ReadyToLand1 Then
  3306.             cmdLandShip1_Click
  3307.         End If
  3308.         If ReadyToLand2 Then
  3309.             cmdLandShip2_Click
  3310.         End If
  3311.         'bring up the message console form
  3312.         frmConfigure.Show Modal
  3313.         'turn off scanner
  3314.         If ScannerOn Then
  3315.             cmdScan_Click
  3316.             ScannerOn = False
  3317.             cmdScan.Enabled = False
  3318.         End If
  3319. End Select
  3320. End Sub
  3321. Private Sub Form_Load()
  3322. 'test
  3323. 'Player(Current).NumResources = 666
  3324. 'Planet(8).Owner = Current
  3325. 'Planet(8).Sabotaged = True
  3326. 'Planet(8).SabotageReduction = 0
  3327. 'Player(Other).NumPlanets = 10
  3328. 'Player(Other).WasBig = True
  3329. 'refresh this variable
  3330. NumPlanetsCaptured = 0
  3331. 'for messages to players in frmAnnounce
  3332. 'to set a random 3rd line
  3333. Dim alternate1 As String
  3334. Dim alternate2 As String
  3335. Dim alternate3 As String
  3336. Dim choice As Integer
  3337. Me.WindowState = DefaultGameSize
  3338. SetAppHelp (Me.hWnd) 'register help file with win engine
  3339. Call DisableX(Me) 'disable the X button on the control box
  3340. 'turn off the planets that aren't in play
  3341. 'due to galaxy size
  3342. Select Case GalaxySize
  3343. Case 30   '20 planets turned off
  3344.     picPlanet(2).Visible = False
  3345.     picPlanet(5).Visible = False
  3346.     picPlanet(7).Visible = False
  3347.     picPlanet(10).Visible = False
  3348.     picPlanet(12).Visible = False
  3349.     picPlanet(14).Visible = False
  3350.     picPlanet(16).Visible = False
  3351.     picPlanet(19).Visible = False
  3352.     picPlanet(21).Visible = False
  3353.     picPlanet(22).Visible = False
  3354.     picPlanet(26).Visible = False
  3355.     picPlanet(28).Visible = False
  3356.     picPlanet(31).Visible = False
  3357.     picPlanet(33).Visible = False
  3358.     picPlanet(34).Visible = False
  3359.     picPlanet(37).Visible = False
  3360.     picPlanet(38).Visible = False
  3361.     picPlanet(43).Visible = False
  3362.     picPlanet(45).Visible = False
  3363.     picPlanet(46).Visible = False
  3364.     picPlanet(49).Visible = False
  3365.     'adjust location of some planets, to even them out
  3366.     picPlanet(0).Top = 600
  3367.     picPlanet(0).Left = 300
  3368.     picPlanet(9).Top = 400
  3369.     picPlanet(9).Left = 5200
  3370. Case 40   '10 planets turned off
  3371.     picPlanet(4).Visible = False
  3372.     picPlanet(11).Visible = False
  3373.     picPlanet(16).Visible = False
  3374.     picPlanet(20).Visible = False
  3375.     picPlanet(22).Visible = False
  3376.     picPlanet(28).Visible = False
  3377.     'picPlanet(31).Visible = False
  3378.     picPlanet(35).Visible = False
  3379.     picPlanet(37).Visible = False
  3380.     picPlanet(39).Visible = False
  3381.     picPlanet(44).Visible = False
  3382. End Select
  3383. 'to trap the function keys:
  3384. KeyPreview = True
  3385. 'reset justlanded to false - not necessary, but just in case...
  3386. Dim v
  3387. For v = 0 To 49
  3388.     Planet(v).JustLanded = False
  3389. Next v
  3390. DrawGalaxy
  3391. 'set the form caption with current player's number
  3392. 'and set player's name in name box
  3393. Personalize
  3394. 'print message in message box
  3395. If IncomingMessage = "" Then
  3396.     txtMessages.FontBold = False
  3397.     txtMessages.ForeColor = vbGreen
  3398.     txtMessages.Text = "No Messages at this time"
  3399.     txtMessages.ForeColor = vbYellow
  3400.     txtMessages.FontBold = True
  3401.     txtMessages.Text = "Incoming Message..."
  3402.     frmMessageConsole.txtMessageBox.Text = IncomingMessage
  3403.     'Beep
  3404. End If
  3405. 'fill in turn number box
  3406. txtTurnNumber.Text = "Turn " & Str(TurnNumber)
  3407. '******BioRocket*******
  3408. '** I moved the part that checks for contaminated planets & calls BioDamage procedure
  3409. '** to the form_activate event - seems to work, showing msgbox on top of gamescreen
  3410. '** instead of on space background...with flag to only show it once/turn
  3411. Dim X As Integer
  3412. 'see if biohazard rockets landed
  3413. For X = 0 To 49
  3414.     If Planet(X).BioRocketETA = TurnNumber Then
  3415.         Detonation (X)
  3416.     End If
  3417. Next X
  3418. '********End BioRocket*********
  3419. '******Aliens********
  3420. CheckForAliens
  3421. 'update troops on alien planets
  3422. UpdateAliens
  3423. 'check for expansion to neutral planets
  3424. AlienExpansion
  3425. '********************
  3426. 'Update players resources
  3427. UpdateResources
  3428. 'fill in planet, troop and resources text boxes
  3429. UpdatePlayerStats
  3430. 'initialize the colours for the status text box
  3431. Dim yellow, red, Green
  3432. yellow = &HFFFF&    'for player 1
  3433. red = &HFF&         'for player 2
  3434. Green = &HFF00&     'for neutral
  3435. 'enable the landing frame if either ship is in warp
  3436. If Player(Current).Ship(0).Launched Or Player(Current).Ship(1).Launched Then
  3437.     fraLanding.Enabled = True
  3438. End If
  3439. 'enable the landing buttons if ships are launched
  3440. If Player(Current).Ship(0).Launched Then
  3441.    cmdLandShip1.Enabled = True
  3442. End If
  3443. If Player(Current).Ship(1).Launched Then
  3444.   cmdLandShip2.Enabled = True
  3445. End If
  3446. '********************************************
  3447. '***********MULTI-TURN RESEARCH**************
  3448. If Player(Current).MechResearchDone = TurnNumber Then
  3449.     'MsgBox "Turnnumber=" + Str(TurnNumber) + "player(current).mechresearchdone=" + Str(Player(Current).MechResearchDone)
  3450.     TechLevel = 1   'techlevel set in module declare.bas
  3451.     Player(Current).MechResearched = True
  3452.     frmTechDone.Show Modal
  3453. End If
  3454. If Player(Current).ShieldResearchDone = TurnNumber Then
  3455.     TechLevel = 2
  3456.     Player(Current).ShieldResearched = True
  3457.     frmTechDone.Show Modal
  3458. End If
  3459. If Player(Current).ResourceResearchDone = TurnNumber Then
  3460.     TechLevel = 3
  3461.     Player(Current).ResourcesResearched = True
  3462.     frmTechDone.Show Modal
  3463. End If
  3464. If Player(Current).ScannerResearchDone = TurnNumber Then
  3465.     TechLevel = 5
  3466.     Player(Current).ScannerResearched = True
  3467.     frmTechDone.Show Modal
  3468. End If
  3469. If Player(Current).BigShipResearchDone = TurnNumber Then
  3470.     TechLevel = 6
  3471.     Player(Current).BigShipResearched = True
  3472.     frmTechDone.Show Modal
  3473. End If
  3474. If Player(Current).UltraWarpResearchDone = TurnNumber Then
  3475.     TechLevel = 7
  3476.     Player(Current).UltraWarpResearched = True
  3477.     frmTechDone.Show Modal
  3478. End If
  3479. If Player(Current).DeepScannerResearchDone = TurnNumber Then
  3480.     TechLevel = 8
  3481.     Player(Current).DeepScannerResearched = True
  3482.     frmTechDone.Show Modal
  3483. End If
  3484. If Player(Current).JammerResearchDone = TurnNumber Then
  3485.     TechLevel = 9
  3486.     Player(Current).JammerResearched = True
  3487.     frmTechDone.Show Modal
  3488. End If
  3489. If Player(Current).CloakingResearchDone = TurnNumber Then
  3490.     TechLevel = 10
  3491.     Player(Current).CloakingResearched = True
  3492.     frmTechDone.Show Modal
  3493. End If
  3494. If Player(Current).Missile1ResearchDone = TurnNumber Then
  3495.     TechLevel = 11
  3496.     Player(Current).Missile1Researched = True
  3497.     frmTechDone.Show Modal
  3498. End If
  3499. If Player(Current).Missile2ResearchDone = TurnNumber Then
  3500.     TechLevel = 12
  3501.     Player(Current).Missile2Researched = True
  3502.     frmTechDone.Show Modal
  3503. End If
  3504. If Player(Current).LaserResearchDone = TurnNumber Then
  3505.     TechLevel = 13
  3506.     Player(Current).LaserResearched = True
  3507.     'recalculate all player's planet's combatstrengths
  3508.     'but not the troops on ships...
  3509.     Dim Q
  3510.     For Q = 0 To 49
  3511.         If Planet(Q).Owner = Current Then
  3512.             SetCombatStrength (Q)
  3513.         End If
  3514.     Next Q
  3515.     frmTechDone.Show Modal
  3516. End If
  3517. If Player(Current).PlasmaResearchDone = TurnNumber Then
  3518.     TechLevel = 14
  3519.     Player(Current).PlasmaResearched = True
  3520.     'reset CS for all troops - except those on ships
  3521.     For Q = 0 To 49
  3522.         If Planet(Q).Owner = Current Then
  3523.             SetCombatStrength (Q)
  3524.         End If
  3525.     Next Q
  3526.     frmTechDone.Show Modal
  3527. End If
  3528. If Player(Current).BioRocketResearchDone = TurnNumber Then
  3529.     TechLevel = 15
  3530.     Player(Current).BioRocketResearched = True
  3531.     frmTechDone.Show Modal
  3532. End If
  3533. If Player(Current).LongBioResearchDone = TurnNumber Then
  3534.     TechLevel = 16
  3535.     Player(Current).LongBioResearched = True
  3536.     frmTechDone.Show Modal
  3537. End If
  3538. If Player(Current).ShipShield1ResearchDone = TurnNumber Then
  3539.     TechLevel = 17
  3540.     Player(Current).ShipShield1Researched = True
  3541.     frmTechDone.Show Modal
  3542. End If
  3543. If Player(Current).ShipShield2ResearchDone = TurnNumber Then
  3544.     TechLevel = 18
  3545.     Player(Current).ShipShield2Researched = True
  3546.     frmTechDone.Show Modal
  3547. End If
  3548. If Player(Current).BioCleanupResearchDone = TurnNumber Then
  3549.     TechLevel = 19
  3550.     Player(Current).BioCleanupResearched = True
  3551.     frmTechDone.Show Modal
  3552. End If
  3553. If Player(Current).RegenerationResearchDone = TurnNumber Then
  3554.     TechLevel = 20
  3555.     Player(Current).RegenerationResearched = True
  3556.     frmTechDone.Show Modal
  3557. End If
  3558. If Player(Current).WarpScannerResearchDone = TurnNumber Then
  3559.     TechLevel = 21
  3560.     Player(Current).WarpScannerResearched = True
  3561.     frmTechDone.Show Modal
  3562. End If
  3563. '**********************************
  3564. '******ANNOUNCEMENTS***********
  3565. 'warn player when enemy has more than 10 planets
  3566. If Player(Other).NumPlanets > 9 And Player(Current).Message1Given = False Then
  3567.     MessageType = "Expanding"
  3568.     Announceline1 = "Reports Show " + Player(Other).Name + "'s Reach"
  3569.     Announceline2 = "Has Extended Across" + Str(Player(Other).NumPlanets) + " Systems."
  3570.     Announceline3 = ""
  3571.     frmAnnounce.Show Modal
  3572.     Player(Current).Message1Given = True
  3573. End If
  3574. 'second warning when more than 20 planets
  3575. If Player(Other).NumPlanets > 19 And Player(Current).Message2Given = False Then
  3576.     MessageType = "Expanding"
  3577.     Announceline1 = Player(Other).Name + "'s Empire Now Spans" + Str(Player(Other).NumPlanets) + " Systems."
  3578.     Announceline2 = "Your People Demand Action!"
  3579.     Announceline3 = ""
  3580.     frmAnnounce.Show Modal
  3581.     Player(Current).Message2Given = True
  3582.     Player(Other).WasBig = True
  3583. End If
  3584. 'message if enemy's empire is shrinking
  3585. If Player(Other).NumPlanets < 12 And Player(Other).WasBig Then
  3586.     MessageType = "Expanding"
  3587.     Announceline1 = Player(Other).Name + "'s Empire is Crumbling -"
  3588.     Announceline2 = "Fewer Than 15 Systems Remain..."
  3589.     Announceline3 = "Victory Is At Hand!"
  3590.     frmAnnounce.Show Modal
  3591.     Player(Other).WasBig = False
  3592. End If
  3593. 'message if planet captured by opponent
  3594. For X = 0 To 49
  3595.     If Planet(X).Owner = Other And Planet(X).Captured = True Then
  3596.         'tell player which planet is lost
  3597.         MessageType = "Captured"
  3598.         Announceline1 = Player(Other).Name + " has triumphed over our forces"
  3599.         Announceline2 = "stationed on " + Planet(X).Name + " ---"
  3600.         
  3601.         '***set a random third line
  3602.         Randomize
  3603.         choice = Int(Rnd * 3) + 1
  3604.                     
  3605.         alternate1 = "We must avenge them!"
  3606.         alternate2 = "This humiliation cannot be accepted..."
  3607.         alternate3 = "We must reclaim this world for the Empire!"
  3608.         
  3609.         Select Case choice
  3610.            Case 1
  3611.                Announceline3 = alternate1
  3612.            Case 2
  3613.                Announceline3 = alternate2
  3614.            Case 3
  3615.                Announceline3 = alternate3
  3616.         End Select
  3617.        
  3618.         frmAnnounce.Show Modal
  3619.         
  3620.         'reset captured variable
  3621.         Planet(X).Captured = False
  3622.      End If
  3623. Next X
  3624. 'message that other player's invasion failed
  3625. For X = 0 To 49
  3626.     If Planet(X).Owner = Current And Planet(X).FailedInvasion = True Then
  3627.         MessageType = "Failed Invasion"
  3628.         
  3629.         '***set a random FIRST line
  3630.         Randomize
  3631.         choice = Int(Rnd * 3) + 1
  3632.                     
  3633.         alternate1 = "Our Forces on " + Planet(X).Name + " have stopped an invasion!"
  3634.         alternate2 = Planet(X).Name + " reports a failed invasion!"
  3635.         alternate3 = Player(Other).Name + " was turned back at " + Planet(X).Name + "!"
  3636.         
  3637.         Select Case choice
  3638.            Case 1
  3639.                Announceline1 = alternate1
  3640.            Case 2
  3641.                Announceline1 = alternate2
  3642.            Case 3
  3643.                Announceline1 = alternate3
  3644.         End Select
  3645.         'Announceline1 = "Our Forces on " + Planet(X).Name + " have repelled an invasion!"
  3646.         Announceline2 = "Troop Losses: " + Str(Planet(X).FailedInvasionTroopLosses)
  3647.         
  3648.         If Player(Current).MechResearched = True Then
  3649.             Announceline3 = "Mech Losses: " + Str(Planet(X).FailedInvasionMechLosses)
  3650.         Else
  3651.             Announceline3 = ""
  3652.         End If
  3653.         
  3654.         frmAnnounce.Show Modal
  3655.                
  3656.         'reset values to prevent repeat messages
  3657.         Planet(X).FailedInvasion = False
  3658.         Planet(X).FailedInvasionTroopLosses = 0
  3659.         Planet(X).FailedInvasionMechLosses = 0
  3660.         
  3661.     End If
  3662. Next X
  3663. 'message if biorocket did not detonate - warn player that enemy tried
  3664. 'to use biorocket on them...
  3665. For X = 0 To 49
  3666.     If Planet(X).Owner = Current And Planet(X).BioFailed Then
  3667.         'warn player that enemy tried to use biorocket
  3668.         MessageType = "BioFailed"
  3669.         Announceline1 = "Leaders on " + Planet(X).Name + " confirm the destruction"
  3670.         Announceline2 = "of an incoming BioChemical Rocket"
  3671.         
  3672.         '***set a random third line
  3673.         Randomize
  3674.         choice = Int(Rnd * 3) + 1
  3675.                     
  3676.         alternate1 = "A catastrophe has been narrowly avoided!"
  3677.         alternate2 = "A swift reprisal is demanded!"
  3678.         alternate3 = "The planet is saved!"
  3679.         
  3680.         Select Case choice
  3681.            Case 1
  3682.                Announceline3 = alternate1
  3683.            Case 2
  3684.                Announceline3 = alternate2
  3685.            Case 3
  3686.                Announceline3 = alternate3
  3687.         End Select
  3688.         frmAnnounce.Show Modal
  3689.         
  3690.         'reset biofailure stuff to avoid repeat messages
  3691.         Planet(X).BioFailed = False
  3692.     End If
  3693. Next X
  3694. 'Message if planet was sabotaged - successful or not
  3695. For X = 0 To 49
  3696.     If Planet(X).Owner = Current And Planet(X).Sabotaged Then
  3697.         'MessageType = "Sabotage"
  3698.         If Planet(X).SabotageReduction = 0 Then
  3699.             'mission was a FAILURE
  3700.             MessageType = "Sabotage Failed"
  3701.             
  3702.             '**this should be in frmAnnounce as well, not just a msgbox...
  3703.             
  3704.             Announceline1 = "Reports from " + Planet(X).Name + " confirm that enemy"
  3705.             Announceline2 = "forces tried to sabotage its resource production --"
  3706.             Announceline3 = "The cowards were destroyed!"
  3707.             
  3708.             frmAnnounce.Show Modal
  3709.             'Dim msg1 As String
  3710.             'Dim msg2 As String
  3711.             'Dim msg3 As String
  3712.             
  3713.             'msg1 = "Reports from " + Planet(X).Name + " confirm that enemy"
  3714.             'msg2 = "forces tried to sabotage its resource production --"
  3715.             'msg3 = "The cowards were destroyed!"
  3716.             
  3717.             'PlaySoundEffect "Warning"
  3718.             'MsgBox msg1 + Chr(13) + msg2 + Chr(13) + msg3, vbExclamation, "Sabotage Alert!"
  3719.             
  3720.             
  3721.             
  3722.             'don't repeat this message every turn!!!
  3723.             Planet(X).Sabotaged = False
  3724.             Planet(X).SabotageReduction = 0
  3725.             Planet(X).SabotagedFactory = False
  3726.         ElseIf Planet(X).SabotageReduction > 0 Or Planet(X).SabotageReduction = -1 Then
  3727.             'NOTE: variable can be -1 if the planet already had 0 resources when sabotaged...
  3728.             
  3729.             'mission was a SUCCESS
  3730.             MessageType = "Sabotage"
  3731.             
  3732.             Announceline1 = "Reports from " + Planet(X).Name + " confirm that saboteurs"
  3733.             If Planet(X).SabotagedFactory Then
  3734.                 Announceline2 = "have destroyed their resource production!"
  3735.             Else
  3736.                 Announceline2 = "have breached the security perimeter!"
  3737.             End If
  3738.             Announceline3 = "Resource production reduced to " + Str(Planet(X).Resources)
  3739.             
  3740.             
  3741.             frmAnnounce.Show Modal
  3742.         
  3743.             'reset sabotage attributes, to avoid the message coming up every turn
  3744.             'and to allow the planet to be sabotaged again...
  3745.             Planet(X).Sabotaged = False
  3746.             Planet(X).SabotageReduction = 0
  3747.             Planet(X).SabotagedFactory = False
  3748.             
  3749.         'ElseIf Planet(X).SabotageReduction = -1 Then
  3750.             'do nothing - sabotaged a planet already at 0 resources
  3751.             
  3752.             'reset sabotage attributes, to avoid the message coming up every turn
  3753.             'and to allow the planet to be sabotaged again...
  3754.         '    Planet(X).Sabotaged = False
  3755.         '    Planet(X).SabotageReduction = 0
  3756.         '    Planet(X).SabotagedFactory = False
  3757.         End If
  3758.         
  3759.     End If
  3760. Next X
  3761. End Sub
  3762. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3763. txtStatus.ForeColor = vbGreen
  3764. txtStatus.Text = ""
  3765. End Sub
  3766. Private Sub Form_Resize()
  3767. RefreshWarpPath
  3768. End Sub
  3769. Private Sub fraEnemyWarpPath_DragDrop(Source As Control, X As Single, Y As Single)
  3770. txtStatus.ForeColor = vbGreen
  3771. End Sub
  3772. Private Sub fraLanding_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3773. txtStatus.Text = ""
  3774. End Sub
  3775. Private Sub fraOptions_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3776. txtStatus.Text = ""
  3777. txtStatus.ForeColor = vbGreen
  3778. End Sub
  3779. Private Sub fraPlayerStats_DragDrop(Source As Control, X As Single, Y As Single)
  3780. txtStatus.ForeColor = vbGreen
  3781. txtStatus.Text = "Player Stats"
  3782. End Sub
  3783. Private Sub fraTactical_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3784. txtStatus.Text = ""
  3785. End Sub
  3786. Private Sub fraUpgrade_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3787.   txtStatus.ForeColor = vbGreen
  3788.   txtStatus.Text = ""
  3789. End Sub
  3790. Private Sub fraWarpPath_DragDrop(Source As Control, X As Single, Y As Single)
  3791. txtStatus.ForeColor = vbGreen
  3792. End Sub
  3793. Private Sub fraWarpPath_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3794. txtStatus.Text = ""
  3795. End Sub
  3796. Private Sub hsbQuantity_Change()
  3797. 'update the quantity label and projected cost
  3798. lblQuantity.Caption = Str(hsbQuantity.Value)
  3799. Quantity = hsbQuantity.Value
  3800. PurchasePrice = Quantity * UnitCost
  3801. txtTotal.Text = Str(PurchasePrice)
  3802. End Sub
  3803. Private Sub hsbQuantity_Scroll()
  3804. 'update the quantity label and projected cost
  3805. lblQuantity.Caption = Str(hsbQuantity.Value)
  3806. Quantity = hsbQuantity.Value
  3807. PurchasePrice = Quantity * UnitCost
  3808. txtTotal.Text = Str(PurchasePrice)
  3809. End Sub
  3810. Private Sub lblTitle_DblClick()
  3811. 'runs code under lblTitle2
  3812. lblTitle2_DblClick
  3813. End Sub
  3814. Private Sub lblTitle2_DblClick()
  3815. 'displays the About box
  3816. Dim Msg As String
  3817. Dim title, dialogtype
  3818. dialogtype = vbOKOnly + vbInformation
  3819. title = "About 4000 A.D."
  3820. Msg = "4000 A.D. - version 2.5 " + Chr(13)
  3821. Msg = Msg + "c. 1997-1999 Gordon Stewart - All Rights Reserved " + Chr(13) + Chr(13)
  3822. Msg = Msg + "Visit 4000 A.D. on the internet at:" + Chr(13)
  3823. Msg = Msg + "http://www.interlog.com/~gordons/4000ad.html" + Chr(13) + Chr(13)
  3824. Msg = Msg + "Free source code now available"
  3825. PlaySoundEffect "Quiet"
  3826. MsgBox Msg, dialogtype, title
  3827. End Sub
  3828. Private Sub picGalaxy_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  3829.   txtStatus.Text = ""
  3830. End Sub
  3831. Private Sub picPlanet_Click(Index As Integer)
  3832. 'match the right ship number - with activeship
  3833. Dim CurrentPlayer, Enemy
  3834. CurrentPlayer = Current
  3835. Enemy = Other
  3836. Dim RandomLosses    'for calculating losses in battles...
  3837. 'placeholders for troop numbers
  3838. Dim a, b
  3839. a = Player(Current).Ship(activeship).Troops
  3840. b = Player(Current).Ship(activeship).AssaultTroops
  3841. '****biorocket
  3842. 'this bit seems to fix a problem with clicking your other planets
  3843. If Planet(Index).LaunchSite = False And Planet(Index).InBioRange = False And BioRocketOn Then
  3844.     EraseLines
  3845. End If
  3846. If Planet(Index).InBioRange And BioRocketOn Then
  3847.     PlaySoundEffect "Button2"
  3848.     If MsgBox("Target this planet?", vbYesNo + vbQuestion, "BioHazard Launch") = vbYes Then
  3849.         If Planet(Index).BioRocketETA > 0 Then
  3850.             PlaySoundEffect "Quiet"
  3851.             MsgBox "This planet has already been targeted", , "BioHazard Launch Aborted"
  3852.             'erase lines and exit sub
  3853.             EraseLines
  3854.             'erase circles if necessary
  3855.             If ReadyToLand1 Or ReadyToLand2 Then
  3856.                 EraseCircles
  3857.             End If
  3858.         Else
  3859.             'if planet inbiorange, and not targeted previously...
  3860.             TargetBioRocket (Index)
  3861.         End If
  3862.         
  3863.     Else    'erase lines and exit sub
  3864.         EraseLines
  3865.         'erase circles if necessary
  3866.         If ReadyToLand1 Or ReadyToLand2 Then
  3867.             EraseCircles
  3868.         End If
  3869.     End If
  3870.         
  3871.     Exit Sub
  3872. End If
  3873. '**end biorocket
  3874. If (ReadyToLand1 = True Or ReadyToLand2 = True) And Planet(Index).InRange And Player(Current).Ship(activeship).Launched Then
  3875.     PlaySoundEffect "Quiet"
  3876.     If MsgBox("Do you want to land here?", vbYesNo + vbQuestion, "Landing") = vbYes Then
  3877.         'get rid of the circles
  3878.         EraseCircles
  3879.         
  3880.         '*****SABOTAGE*****
  3881.         If Player(Current).Ship(activeship).Sabotage Then
  3882.             'goto sabotage routine
  3883.             Call SabotageLanding(Index, activeship)
  3884.             ReInitializeShip (activeship)
  3885.             Exit Sub
  3886.         End If
  3887.         '****END OF SABOTAGE *****
  3888.         
  3889.         
  3890.         'select type of landing - friendly, neutral or attack
  3891.         Select Case Planet(Index).Owner
  3892.         
  3893.         Case CurrentPlayer
  3894.             'landing on planet player owns
  3895.             PlaySoundEffect "Quiet"
  3896.             MsgBox "Landing successful", , " "
  3897.             'update planet, ship stats, player stats
  3898.             UpdateNumPlanets
  3899.             UpdatePlayerStats
  3900.             
  3901.             'disable the landing button and remove from warp path
  3902.             If activeship = 0 Then
  3903.                 cmdLandShip1.Enabled = False
  3904.                 'get rid of the ship picture
  3905.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  3906.             End If
  3907.             
  3908.             If activeship = 1 Then
  3909.                 cmdLandShip2.Enabled = False
  3910.                 'get rid of the ship picture
  3911.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  3912.             End If
  3913.             
  3914.             
  3915.             'set ship values to unlaunched and empty
  3916.             ReInitializeShip (activeship)
  3917.             
  3918.             RefreshWarpPath
  3919.           
  3920.             'add the players stuff to the planet
  3921.             Planet(Index).Troops = Planet(Index).Troops + a
  3922.             Planet(Index).AssaultTroops = Planet(Index).AssaultTroops + b
  3923.             SetCombatStrength (Index)
  3924.             
  3925.                 
  3926.             'set ship values to unlaunched and empty
  3927.             ReInitializeShip (activeship)
  3928.             
  3929.             'clear the management frame
  3930.             ClearFrame
  3931.             
  3932.             cmdPreviewShip1.Enabled = True
  3933.             cmdPreviewShip2.Enabled = True
  3934.             cmdPreviewEnemy1.Enabled = True
  3935.             cmdPreviewEnemy2.Enabled = True
  3936.             
  3937.         Case Enemy
  3938.             'landing on other player's planet
  3939.             PlaySoundEffect "Attack"
  3940.             
  3941.             Randomize
  3942.             
  3943.             'set placeholder for current player's combat strength
  3944.             AttackStrength = Player(Current).Ship(activeship).CombatStrength
  3945.             DefenceStrength = Planet(Index).CombatStrength
  3946.             
  3947.             'set placeholders for troops on the planet
  3948.             Dim c, d
  3949.             c = Planet(Index).Troops
  3950.             d = Planet(Index).AssaultTroops
  3951.             
  3952.             'compare the strengths
  3953.             If AttackStrength > DefenceStrength Then
  3954.                 'ATTACKER WINS
  3955.                 NumPlanetsCaptured = NumPlanetsCaptured + 1
  3956.                 Planet(Index).Captured = True
  3957.                                 
  3958.                 'don't allow player to launch from this planet this turn
  3959.                 Planet(Index).JustLanded = True
  3960.                     
  3961.                 'winner loses % of troops based on defensive CS
  3962.                 'initial value
  3963.                 TroopLosses = 0
  3964.                 If a > 0 And DefenceStrength > 0 Then
  3965.                     
  3966.                     Select Case DefenceStrength
  3967.                     Case 0      'no losses
  3968.                         TroopLosses = 0
  3969.                     Case 1 To 2  '0-10% losses
  3970.                         TroopLosses = Int(Rnd * 10)
  3971.                     Case 3 To 4  '5-15% losses
  3972.                         TroopLosses = Int(Rnd * 10) + 5
  3973.                     Case 5 To 7  '10-20%
  3974.                         TroopLosses = Int(Rnd * 10) + 10
  3975.                     Case 8 To 10  '15-25%
  3976.                         TroopLosses = Int(Rnd * 10) + 15
  3977.                     Case 11 To 15 '15-30%
  3978.                         TroopLosses = Int(Rnd * 15) + 15
  3979.                     Case 16 To 200 '20-35%
  3980.                         TroopLosses = Int(Rnd * 15) + 20
  3981.                     Case Else    '20-45%
  3982.                         TroopLosses = Int(Rnd * 25) + 20
  3983.                     End Select
  3984.                     
  3985.                     a = a - (a * (TroopLosses / 100))
  3986.                     
  3987.                     Debug.Print "**Troop Losses = " & Str(TroopLosses) & "%"
  3988.                 End If
  3989.                 
  3990.                 'winner loses % of assault troops
  3991.                 'initial value
  3992.                 
  3993.                 AssaultLosses = 0
  3994.                 If b > 0 And DefenceStrength > 0 Then
  3995.                     Select Case DefenceStrength
  3996.                       Case 0   '0% losses
  3997.                           AssaultLosses = 0
  3998.                       Case 1 To 3  '0-10%
  3999.                           AssaultLosses = Int(Rnd * 10)
  4000.                       Case 4 To 7  '0-15%
  4001.                           AssaultLosses = Int(Rnd * 15)
  4002.                       Case 8 To 12 '5-15%
  4003.                           AssaultLosses = Int(Rnd * 10) + 5
  4004.                       Case 13 To 17 '10-20%
  4005.                           AssaultLosses = Int(Rnd * 10) + 10
  4006.                       Case 18 To 250 '15-25%
  4007.                           AssaultLosses = Int(Rnd * 10) + 15
  4008.                       Case Else    '15-35%
  4009.                           AssaultLosses = Int(Rnd * 20) + 15
  4010.                     End Select
  4011.                     
  4012.                     b = b - (b * (AssaultLosses / 100))
  4013.                 End If
  4014.                                                               
  4015.                 'planet troops, combatstrength changes
  4016.                 Planet(Index).Troops = a
  4017.                 Planet(Index).AssaultTroops = b
  4018.                 'update other player's stats with c & d (above)
  4019.                 Player(Other).NumTroops = Player(Other).NumTroops - Planet(Index).Troops
  4020.                 Player(Other).NumAssaultTroops = Player(Other).NumAssaultTroops - d
  4021.                 Player(Other).NumPlanets = Player(Other).NumPlanets - 1
  4022.                                 
  4023.                'set this variable for frmlandscape:
  4024.                 ActivePlanet = Index
  4025.                 
  4026.                 'show the results of the battle
  4027.                 'owner of planet not changed yet, to show results of battle - see right below
  4028.                 frmLandscape.Show Modal
  4029.                 
  4030.                 'planet changes owners
  4031.                 Planet(Index).Owner = Current
  4032.                                 
  4033.                 'set planet's combat strength
  4034.                 SetCombatStrength (Index)
  4035.                 'update player: resources, numplanets
  4036.                 UpdateNumPlanets
  4037.                 UpdatePlayerStats
  4038.             
  4039.                 'clear the management frame
  4040.                 ClearFrame
  4041.                 
  4042.                 cmdPreviewShip1.Enabled = True
  4043.                 cmdPreviewShip2.Enabled = True
  4044.                 cmdPreviewEnemy1.Enabled = True
  4045.                 cmdPreviewEnemy2.Enabled = True
  4046.             '************************************
  4047.             ElseIf AttackStrength <= Planet(Index).CombatStrength Then
  4048.                 'DEFENDER WINS, and tie goes to the defender
  4049.                 
  4050.                 'notify other player next turn
  4051.                 Planet(Index).FailedInvasion = True
  4052.                 
  4053.                 'lose all your troops
  4054.                 Player(Current).NumTroops = Player(Current).NumTroops - a
  4055.                 Player(Current).NumAssaultTroops = Player(Current).NumAssaultTroops - b
  4056.                         
  4057.                 If Planet(Index).Troops > 0 Then
  4058.                    'defender wins, but loses % of troops based on attacker's CS
  4059.                    'initial value
  4060.                    TroopLosses = 0
  4061.                     
  4062.                     Select Case AttackStrength
  4063.                     Case 0      'no losses
  4064.                         TroopLosses = 0
  4065.                     Case 1 To 2  '0-10% losses
  4066.                         TroopLosses = Int(Rnd * 10)
  4067.                     Case 3 To 4  '0-15% losses
  4068.                         TroopLosses = Int(Rnd * 15)
  4069.                     Case 5 To 8  '5-15%
  4070.                         TroopLosses = Int(Rnd * 10) + 5
  4071.                     Case 9 To 12  '10-20%
  4072.                         TroopLosses = Int(Rnd * 10) + 10
  4073.                     Case 13 To 15 '10-30%
  4074.                         TroopLosses = Int(Rnd * 20) + 10
  4075.                     Case 16 To 20 '15-35%
  4076.                         TroopLosses = Int(Rnd * 20) + 15
  4077.                     Case 21 To 25 '15-40%
  4078.                         TroopLosses = Int(Rnd * 25) + 15
  4079.                     Case 26 To 35 '20-45%
  4080.                         TroopLosses = Int(Rnd * 25) + 20
  4081.                     Case 36 To 45 '25-40%
  4082.                         TroopLosses = Int(Rnd * 15) + 25
  4083.                     Case Else    '25-50%
  4084.                         TroopLosses = Int(Rnd * 25) + 25
  4085.                     End Select
  4086.                     
  4087.                     'for next turn's notification of failed invasion
  4088.                     Planet(Index).FailedInvasionTroopLosses = Int(c * (TroopLosses / 100))
  4089.                                         
  4090.                     c = c - (c * (TroopLosses / 100))
  4091.                     Planet(Index).Troops = c
  4092.                 End If
  4093.                 
  4094.                 If Planet(Index).AssaultTroops > 0 Then
  4095.                     'defender/winner loses % of assault troops
  4096.                     'initial value 0
  4097.                     AssaultLosses = 0
  4098.                     
  4099.                     Select Case AttackStrength
  4100.                     Case 0 To 5 '0% losses
  4101.                         AssaultLosses = 0
  4102.                     Case 6 To 10 '0-10%
  4103.                         AssaultLosses = Int(Rnd * 10)
  4104.                         Debug.Print "Arrgh! Attackstrength:" + Str(AttackStrength), "Assaultlosses:" + Str(AssaultLosses)
  4105.                     Case 11 To 15 '0-15%
  4106.                         AssaultLosses = Int(Rnd * 15)
  4107.                     Case 16 To 25 '5-20%
  4108.                         AssaultLosses = Int(Rnd * 15) + 5
  4109.                     Case 26 To 40 '10-20%
  4110.                         AssaultLosses = Int(Rnd * 10) + 10
  4111.                     Case 41 To 60 '15-30%
  4112.                         AssaultLosses = Int(Rnd * 15) + 15
  4113.                     Case 61 To 80 '20-35%
  4114.                         AssaultLosses = Int(Rnd * 15) + 20
  4115.                     Case Else    '20-40%
  4116.                         AssaultLosses = Int(Rnd * 20) + 20
  4117.                     End Select
  4118.                     
  4119.                     Planet(Index).FailedInvasionMechLosses = Int(d * (AssaultLosses / 100))
  4120.                     
  4121.                     d = d - (d * (AssaultLosses / 100))
  4122.                     Planet(Index).AssaultTroops = d
  4123.                 End If
  4124.                                   
  4125.                 'update planet's combat strength
  4126.                 SetCombatStrength (Index)
  4127.                 UpdateNumPlanets
  4128.                 UpdatePlayerStats
  4129.                       
  4130.                 'clear management frame
  4131.                 ClearFrame
  4132.                 
  4133.                 cmdPreviewShip1.Enabled = True
  4134.                 cmdPreviewShip2.Enabled = True
  4135.                 cmdPreviewEnemy1.Enabled = True
  4136.                 cmdPreviewEnemy2.Enabled = True
  4137.                
  4138.                'set this variable for frmlandscape:
  4139.                 ActivePlanet = Index
  4140.                 'show the results of the battle
  4141.                 frmLandscape.Show Modal
  4142.                              
  4143.             End If
  4144.             
  4145.             'disable the landing button and remove from warp path
  4146.             If activeship = 0 Then
  4147.                 cmdLandShip1.Enabled = False
  4148.                 'get rid of the ship picture
  4149.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  4150.             ElseIf activeship = 1 Then
  4151.                 cmdLandShip2.Enabled = False
  4152.                 'get rid of the ship picture
  4153.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  4154.             
  4155.             End If
  4156.             
  4157.             'set ship values to unlaunched and empty
  4158.             ReInitializeShip (activeship)
  4159.         
  4160.             RefreshWarpPath
  4161.             
  4162.         Case 2
  4163.             'landing on UNOWNED planet
  4164.             PlaySoundEffect "Quiet"
  4165.             MsgBox "A new planet for you!", , " "
  4166.             Planet(Index).Owner = Current
  4167.             Planet(Index).JustLanded = True    'so you can't take off again this turn
  4168.             
  4169.             'add the players stuff to the planet
  4170.             Planet(Index).Troops = a
  4171.             Planet(Index).AssaultTroops = b
  4172.             SetCombatStrength (Index)
  4173.             
  4174.             'update player: resources, numplanets
  4175.             UpdateNumPlanets
  4176.             UpdatePlayerStats
  4177.             
  4178.             'clear management frame
  4179.             ClearFrame
  4180.             
  4181.             cmdPreviewShip1.Enabled = True
  4182.             cmdPreviewShip2.Enabled = True
  4183.             cmdPreviewEnemy1.Enabled = True
  4184.             cmdPreviewEnemy2.Enabled = True
  4185.             
  4186.             'deal with the landing button and warp path picture
  4187.             If activeship = 0 Then
  4188.                 cmdLandShip1.Enabled = False
  4189.                 'get rid of the ship picture
  4190.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  4191.             ElseIf activeship = 1 Then
  4192.                 cmdLandShip2.Enabled = False
  4193.                 'get rid of the ship picture
  4194.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  4195.             End If
  4196.             
  4197.             'set ship values to unlaunched and empty
  4198.             ReInitializeShip (activeship)
  4199.             
  4200.             RefreshWarpPath
  4201.             
  4202.             'show the landscape screen with troop stats
  4203.             ActivePlanet = Index
  4204.             frmLandscape.Show Modal
  4205.         Case 3
  4206.             AttackAliens (Index)
  4207.         End Select
  4208.         
  4209.     Else  'answered NO to msgbox - turn off circles, set rtl false
  4210.       EraseCircles
  4211.       ReadyToLand1 = False
  4212.       ReadyToLand2 = False
  4213.       
  4214.       cmdPreviewShip1.Enabled = True
  4215.       cmdPreviewShip2.Enabled = True
  4216.       cmdPreviewEnemy1.Enabled = True
  4217.       cmdPreviewEnemy2.Enabled = True
  4218.       
  4219.       
  4220.       If Player(Current).Ship(0).Launched Then
  4221.          cmdLandShip1.Enabled = True
  4222.       End If
  4223.       
  4224.       If Player(Current).Ship(1).Launched Then
  4225.          cmdLandShip2.Enabled = True
  4226.       End If
  4227.       
  4228.       Exit Sub
  4229.     End If
  4230.     'quit without showing "Hey! Not your planet box"
  4231. Exit Sub
  4232. End If
  4233. '******************************
  4234. '*****Planet Management********
  4235. '******************************
  4236. If Planet(Index).Owner = Current Then
  4237.     On Error Resume Next
  4238.     PlaySoundEffect "Ambient3"
  4239.     'PlayRandomSound
  4240.     On Error GoTo 0
  4241.     'clear frame first
  4242.     ClearFrame
  4243.         
  4244.    'enable the management box and the ship box
  4245.    fraUpgrade.Enabled = True
  4246.    cmdOK.Enabled = True
  4247.    hsbQuantity.Enabled = False
  4248.    txtTotal.Text = ""
  4249.    fraLanding.Enabled = True
  4250.    fraTactical.Enabled = True
  4251.    'show what planet is active, set it to active
  4252.    ActivePlanet = Index
  4253.    cmdPlanetName.Caption = Planet(Index).Name
  4254.    '********turn on buttons as available:
  4255.    'launch button enabled if at least one ship available
  4256.    If Player(Current).Ship(0).Launched And Player(Current).Ship(1).Launched Then
  4257.         cmdLaunch.Enabled = False
  4258.    Else
  4259.         cmdLaunch.Enabled = True
  4260.    End If
  4261.    'scanner button enabled if planet has a scanner
  4262.    If Planet(Index).HaveScanner Then
  4263.         cmdScan.Enabled = True
  4264.    ElseIf Planet(Index).HaveScanner = False Then
  4265.         cmdScan.Enabled = False
  4266.    End If
  4267.    'RepairIndustry button enabled if planet is damaged
  4268.    If Planet(Index).Damaged Then
  4269.         cmdRepairIndustry.Enabled = True
  4270.    End If
  4271.    'Biohazard button enabled if tech researched
  4272.    If Player(Current).BioRocketResearched Then
  4273.        cmdLaunchBioRocket.Enabled = True
  4274.    End If
  4275.    'regenerate button enabled if tech researched and if needed
  4276.    If Player(Current).RegenerationResearched And Planet(Index).NukedResources Then
  4277.        cmdRegenerate.Enabled = True
  4278.    End If
  4279.    'detoxify button enabled if tech researched and if needed
  4280.    If Player(Current).BioCleanupResearched And Planet(Index).Contaminated Then
  4281.         cmdCleanup.Enabled = True
  4282.    End If
  4283. Else   'planet not owned by current player
  4284.     PlaySoundEffect "Access"
  4285.     MsgBox "Hey! Not your planet", vbOKOnly + vbExclamation, "Access Denied"
  4286.         
  4287.    'disable mgmt frame, erase circles, set rtl to false
  4288.    ClearFrame
  4289.    'should only erase circles if part of a landing scenario...
  4290.    If ReadyToLand1 = True Or ReadyToLand2 = True Then
  4291.        EraseCircles
  4292.        ReadyToLand1 = False
  4293.        ReadyToLand2 = False
  4294.    End If
  4295.    'clear the board of any inrange scanner settings
  4296.    Dim z As Integer
  4297.    For z = 0 To 49
  4298.        Planet(z).InScannerRange = False
  4299.    Next z
  4300.    Dim Count
  4301.    For Count = 0 To 49
  4302.      If Planet(Count).LaunchSite = True Then
  4303.         EraseLines
  4304.      End If
  4305.    Next Count
  4306.    cmdPreviewShip1.Enabled = True
  4307.    cmdPreviewShip2.Enabled = True
  4308.    cmdPreviewEnemy1.Enabled = True
  4309.    cmdPreviewEnemy2.Enabled = True
  4310.    If Player(Current).Ship(0).Launched Then
  4311.       cmdLandShip1.Enabled = True
  4312.    End If
  4313.    If Player(Current).Ship(1).Launched Then
  4314.       cmdLandShip2.Enabled = True
  4315.    End If
  4316. End If
  4317. End Sub
  4318. Private Sub picPlanet_DblClick(Index As Integer)
  4319. 'go to planet view screen
  4320. cmdPlanetName_Click
  4321. End Sub
  4322. Private Sub picPlanet_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4323. 'public const neutral and alien in .bas module
  4324. 'Neutral = 2
  4325. 'Alien = 3
  4326. If ScannerOn Then
  4327.     'show full stats if in range
  4328.     If Planet(Index).Owner = Current Then
  4329.         txtStatus.ForeColor = vbYellow
  4330.         'show full stats
  4331.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources & "  Troops:" & Planet(Index).Troops _
  4332.         & "  Mechs: " & Planet(Index).AssaultTroops & _
  4333.         "  CS:" & Planet(Index).CombatStrength
  4334.     ElseIf Planet(Index).Owner = Neutral Then
  4335.         'show basic stats in green
  4336.         txtStatus.ForeColor = vbGreen
  4337.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4338.         
  4339.     ElseIf Planet(Index).Owner = Alien And Planet(Index).InScannerRange Then
  4340.         'show full stats in blue
  4341.         txtStatus.ForeColor = vbBlue
  4342.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources & "  Troops:" & Planet(Index).Troops _
  4343.         & "  Mechs:" & Planet(Index).AssaultTroops & _
  4344.         "  CS:" & Planet(Index).CombatStrength
  4345.     ElseIf Planet(Index).Owner = Other And Planet(Index).InScannerRange Then
  4346.         'show full stats in red
  4347.         txtStatus.ForeColor = vbRed
  4348.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources & "  Troops:" & Planet(Index).Troops _
  4349.         & "  Mechs:" & Planet(Index).AssaultTroops & _
  4350.         "  CS:" & Planet(Index).CombatStrength
  4351.     ElseIf Planet(Index).Owner = Alien Then
  4352.         'show basic stats in blue
  4353.         txtStatus.ForeColor = vbBlue
  4354.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4355.     ElseIf Planet(Index).Owner = Other Then
  4356.         'show basic stats in red
  4357.         txtStatus.ForeColor = vbRed
  4358.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4359.         
  4360.     End If
  4361. ElseIf ScannerOn = False Then
  4362.     'full stats for owned planets, basic for everything else
  4363.     Select Case Planet(Index).Owner
  4364.     Case Current
  4365.         txtStatus.ForeColor = vbYellow
  4366.         'show full stats
  4367.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources & "  Troops:" & Planet(Index).Troops _
  4368.         & "  Mechs:" & Planet(Index).AssaultTroops & _
  4369.         "  CS:" & Planet(Index).CombatStrength
  4370.     Case Neutral
  4371.         'show basic stats in green
  4372.         txtStatus.ForeColor = vbGreen
  4373.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4374.     Case Alien
  4375.         'show full stats in blue
  4376.         txtStatus.ForeColor = vbBlue
  4377.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4378.     Case Other
  4379.         'show full stats in red
  4380.         txtStatus.ForeColor = vbRed
  4381.         txtStatus.Text = Planet(Index).Name & ":  Resources:" & Planet(Index).Resources
  4382.     End Select
  4383. End If
  4384. End Sub
  4385. Private Sub picUpgrade_DblClick(Index As Integer)
  4386. 'turn off scanner if it's on
  4387. If ScannerOn Then
  4388.     cmdScan_Click
  4389.     ScannerOn = False
  4390. End If
  4391. 'start buying procedure
  4392. 'see what is being bought/researched
  4393. txtStatus.ForeColor = vbGreen
  4394. Select Case Index
  4395. Case 0
  4396.     'missile defences for planet
  4397.     'fixed price of 10/planet
  4398.     '***moving Unitcost into the 'if tech researched' part
  4399.     'UnitCost = 10
  4400.     'exit sub if planet already has missiles
  4401.      If Planet(ActivePlanet).HaveMissiles Then
  4402.         PlaySoundEffect "Quiet"
  4403.         MsgBox "This planet is already equipped with missiles", vbInformation, "Transaction Cancelled"
  4404.         Exit Sub
  4405.      End If
  4406.     'check if technology researched
  4407.     If Player(Current).Missile1Researched Then
  4408.         'check if enough money!
  4409.         UnitCost = 10
  4410.         If Player(Current).NumResources >= UnitCost Then
  4411.             'first, enable the scrollbar
  4412.             hsbQuantity.Enabled = True
  4413.             hsbQuantity.Value = 0
  4414.             lblItemName = "Missile Defences"
  4415.             lblQuantity = Str(hsbQuantity.Value)
  4416.             txtTotal.Text = Str(hsbQuantity.Value)
  4417.             'get max value for scroll bar
  4418.             hsbQuantity.Max = 1
  4419.         Else
  4420.             PlaySoundEffect "Quiet"
  4421.             MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4422.         End If
  4423.     Else
  4424.         PlaySoundEffect "Quiet"
  4425.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4426.     End If
  4427. Case 1
  4428.     'Planetary shield - fixed cost/planet
  4429.     '****testing moving this into 'if tech researched'
  4430.     'UnitCost = 15
  4431.     'exit sub if planet already has a shield
  4432.      If Planet(ActivePlanet).HaveShields Then
  4433.         PlaySoundEffect "Quiet"
  4434.         MsgBox "This planet is already protected by a planetary shield", vbInformation, "Transaction Cancelled"
  4435.         Exit Sub
  4436.      End If
  4437.      
  4438.     If Player(Current).ShieldResearched Then
  4439.         'check if enough money!
  4440.         UnitCost = 15
  4441.         If Player(Current).NumResources >= UnitCost Then
  4442.             'enable the scrollbar
  4443.             hsbQuantity.Enabled = True
  4444.             hsbQuantity.Value = 0
  4445.             lblItemName = "Planetary Shield"
  4446.             lblQuantity = Str(hsbQuantity.Value)
  4447.             txtTotal.Text = Str(hsbQuantity.Value)
  4448.             'get max value for scroll bar
  4449.             hsbQuantity.Max = 1
  4450.         Else
  4451.             PlaySoundEffect "Quiet"
  4452.             MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4453.         End If
  4454.     Else
  4455.         PlaySoundEffect "Quiet"
  4456.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4457.     End If
  4458. Case 2
  4459.     'improved resource production - fixed cost/planet
  4460.     'unitcost moved into 'if tech researched' part
  4461.     'UnitCost = 15
  4462.         
  4463.         'check for resources already high enough - ie 5
  4464.      If Planet(ActivePlanet).ImprovedResources Or Planet(ActivePlanet).Resources > 5 Then
  4465.         PlaySoundEffect "Quiet"
  4466.         MsgBox "This planet has already maximized its production capacity", vbInformation, "Transaction Cancelled"
  4467.         Exit Sub
  4468.      End If
  4469.     'check if player has researched this item
  4470.     If Player(Current).ResourcesResearched Then
  4471.         'check if enough money!
  4472.         UnitCost = 15
  4473.         If Player(Current).NumResources >= UnitCost Then
  4474.             'first, enable the scrollbar
  4475.             hsbQuantity.Enabled = True
  4476.             hsbQuantity.Value = 0
  4477.             lblItemName = "Improved Resource Production"
  4478.             lblQuantity = Str(hsbQuantity.Value)
  4479.             txtTotal.Text = Str(hsbQuantity.Value)
  4480.             'get max value for scroll bar
  4481.             hsbQuantity.Max = 1
  4482.         Else
  4483.             PlaySoundEffect "Quiet"
  4484.             MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4485.         End If
  4486.     Else
  4487.         PlaySoundEffect "Quiet"
  4488.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4489.     End If
  4490. Case 3
  4491.     'regular troops
  4492.     UnitCost = 1
  4493.     'check if enough money!
  4494.     If Player(Current).NumResources >= UnitCost Then
  4495.         'first, enable the scrollbar
  4496.         hsbQuantity.Enabled = True
  4497.         hsbQuantity.Value = 0
  4498.         lblItemName = "Troops"
  4499.         lblQuantity = Str(hsbQuantity.Value)
  4500.         txtTotal.Text = Str(hsbQuantity.Value)
  4501.         'get max value for scroll bar
  4502.         hsbQuantity.Max = Int(Player(Current).NumResources / UnitCost)
  4503.     Else
  4504.         PlaySoundEffect "Quiet"
  4505.         MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4506.     End If
  4507. Case 4
  4508.     'buying assault troops
  4509.     'UnitCost = 4
  4510.     'check if player has researched this item
  4511.     If Player(Current).MechResearched Then
  4512.         UnitCost = 4
  4513.         'check if enough money
  4514.         If Player(Current).NumResources >= UnitCost Then
  4515.            'enable the scrollbar
  4516.            hsbQuantity.Enabled = True
  4517.            hsbQuantity.Value = 0
  4518.            lblItemName = "Assault Mechs"
  4519.            lblQuantity = Str(hsbQuantity.Value)
  4520.            txtTotal.Text = Str(hsbQuantity.Value)
  4521.            'get max value for scroll bar
  4522.            hsbQuantity.Max = Int(Player(Current).NumResources / UnitCost)
  4523.         Else
  4524.            PlaySoundEffect "Quiet"
  4525.            MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4526.         End If
  4527.     Else
  4528.         PlaySoundEffect "Quiet"
  4529.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4530.     End If
  4531. Case 5
  4532.     'here is where I load a tech research form
  4533.     'with buttons for assault troops, ship tech, resource tech, and planet defenses
  4534.     frmResearch.Show Modal
  4535. Case 6
  4536.     'scanners
  4537.     'UnitCost = 25
  4538.     'exit sub if planet already has a shield
  4539.      If Planet(ActivePlanet).HaveScanner Then
  4540.         PlaySoundEffect "Quiet"
  4541.         MsgBox "This planet already has a scanner", vbInformation, "Transaction Cancelled"
  4542.         Exit Sub
  4543.      End If
  4544.      
  4545.     If Player(Current).ScannerResearched Then
  4546.         UnitCost = 25
  4547.         'check if enough money!
  4548.         If Player(Current).NumResources >= UnitCost Then
  4549.             'enable the scrollbar
  4550.             hsbQuantity.Enabled = True
  4551.             hsbQuantity.Value = 0
  4552.             lblItemName = "Scanner"
  4553.             lblQuantity = Str(hsbQuantity.Value)
  4554.             txtTotal.Text = Str(hsbQuantity.Value)
  4555.             'get max value for scroll bar
  4556.             hsbQuantity.Max = 1
  4557.         Else
  4558.             PlaySoundEffect "Quiet"
  4559.             MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4560.         End If
  4561.     Else
  4562.         PlaySoundEffect "Quiet"
  4563.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4564.     End If
  4565. Case 7
  4566.     'jammers
  4567.     'UnitCost = 15
  4568.     'exit sub if planet already has a shield
  4569.      If Planet(ActivePlanet).HaveJammer Then
  4570.         PlaySoundEffect "Quiet"
  4571.         MsgBox "This planet already has a jamming device", vbInformation, "Transaction Cancelled"
  4572.         Exit Sub
  4573.      End If
  4574.      
  4575.     If Player(Current).JammerResearched Then
  4576.         'check if enough money!
  4577.         UnitCost = 15
  4578.         If Player(Current).NumResources >= UnitCost Then
  4579.             'enable the scrollbar
  4580.             hsbQuantity.Enabled = True
  4581.             hsbQuantity.Value = 0
  4582.             lblItemName = "Scanner Jamming Device"
  4583.             lblQuantity = Str(hsbQuantity.Value)
  4584.             txtTotal.Text = Str(hsbQuantity.Value)
  4585.             'get max value for scroll bar
  4586.             hsbQuantity.Max = 1
  4587.         Else
  4588.             PlaySoundEffect "Quiet"
  4589.             MsgBox "Insufficient resources", vbExclamation, "Transaction Denied"
  4590.         End If
  4591.     Else
  4592.         PlaySoundEffect "Quiet"
  4593.         MsgBox "You do not have this technology", vbExclamation, "Access Denied"
  4594.     End If
  4595. End Select
  4596. End Sub
  4597. Private Sub picUpgrade_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  4598. txtStatus.ForeColor = vbGreen
  4599. 'show text describing each of the upgrade icons
  4600. Select Case Index
  4601. Case 0
  4602.     txtStatus.Text = "Planetary Missile Defences"
  4603. Case 1
  4604.     txtStatus.Text = "Planetary Shield Defenses"
  4605. Case 2
  4606.     txtStatus.Text = "Improved Resource Production Facility"
  4607. Case 3
  4608.     txtStatus.Text = "Recruit Troops"
  4609. Case 4
  4610.     txtStatus.Text = "Recruit Assault Troops"
  4611. Case 5
  4612.     txtStatus.Text = "Research Advanced Technologies"
  4613. Case 6
  4614.     txtStatus.Text = "Space Scanner"
  4615. Case 7
  4616.     txtStatus.Text = "Anti-Scanning Jammer"
  4617. End Select
  4618. End Sub
  4619. Private Sub tmrRandomSounds_Timer()
  4620. 'play random sound effect
  4621. PlayRandomSound
  4622. End Sub
  4623. Private Sub tmrUpdateMessageBox_Timer()
  4624. txtMessages.Text = "No New Messages..."
  4625. tmrUpdateMessageBox.Enabled = False
  4626. End Sub
  4627. Private Sub txtMessages_KeyDown(KeyCode As Integer, Shift As Integer)
  4628. KeyCode = 0
  4629. End Sub
  4630. Private Sub txtMessages_KeyPress(KeyAscii As Integer)
  4631. KeyAscii = 0
  4632. End Sub
  4633. Private Sub txtMessages_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4634. txtStatus.Text = "View or Send Messages"
  4635. End Sub
  4636. Private Sub txtNumAssaultTroops_KeyDown(KeyCode As Integer, Shift As Integer)
  4637. KeyCode = 0
  4638. End Sub
  4639. Private Sub txtNumAssaultTroops_KeyPress(KeyAscii As Integer)
  4640. KeyAscii = 0
  4641. End Sub
  4642. Private Sub txtNumPlanets_KeyDown(KeyCode As Integer, Shift As Integer)
  4643. KeyCode = 0
  4644. End Sub
  4645. Private Sub txtNumPlanets_KeyPress(KeyAscii As Integer)
  4646. KeyAscii = 0
  4647. End Sub
  4648. Private Sub txtNumResources_KeyDown(KeyCode As Integer, Shift As Integer)
  4649. KeyCode = 0
  4650. End Sub
  4651. Private Sub txtNumResources_KeyPress(KeyAscii As Integer)
  4652. KeyAscii = 0
  4653. End Sub
  4654. Private Sub txtNumTroops_KeyDown(KeyCode As Integer, Shift As Integer)
  4655. KeyCode = 0
  4656. End Sub
  4657. Private Sub txtNumTroops_KeyPress(KeyAscii As Integer)
  4658. KeyAscii = 0
  4659. End Sub
  4660. Private Sub txtPlayerName_KeyDown(KeyCode As Integer, Shift As Integer)
  4661. KeyCode = 0
  4662. End Sub
  4663. Private Sub txtPlayerName_KeyPress(KeyAscii As Integer)
  4664. KeyAscii = 0
  4665. End Sub
  4666. Private Sub txtPlayerName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4667. txtStatus.Text = ""
  4668. End Sub
  4669. Private Sub txtProduction_KeyDown(KeyCode As Integer, Shift As Integer)
  4670. KeyCode = 0
  4671. End Sub
  4672. Private Sub txtProduction_KeyPress(KeyAscii As Integer)
  4673. KeyAscii = 0
  4674. End Sub
  4675. Private Sub txtStatus_KeyPress(KeyAscii As Integer)
  4676. KeyAscii = 0
  4677. End Sub
  4678. Private Sub txtStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4679. txtStatus.Text = ""
  4680. End Sub
  4681. Public Sub DrawGalaxy()
  4682. Randomize
  4683. 'Called by the form_Activate procedure
  4684. 'draw white stars on the playing field
  4685. Dim a, X, Y
  4686. For a = 1 To 700
  4687.     X = Int(Rnd * picGalaxy.ScaleWidth)
  4688.     Y = Int(Rnd * picGalaxy.ScaleHeight)
  4689.     picGalaxy.PSet (X, Y)
  4690. Next a
  4691. 'draw darker stars for depth
  4692.     Dim grey
  4693.     grey = &H808080
  4694.     For a = 1 To 1000
  4695.         X = Int(Rnd * picGalaxy.ScaleWidth)
  4696.         Y = Int(Rnd * picGalaxy.ScaleHeight)
  4697.         picGalaxy.PSet (X, Y), grey
  4698.     Next a
  4699.        
  4700. 'drawing grid lines moved to its own proc
  4701. End Sub
  4702. Private Sub txtTurnNumber_KeyDown(KeyCode As Integer, Shift As Integer)
  4703. KeyCode = 0
  4704. End Sub
  4705. Private Sub txtTurnNumber_KeyPress(KeyAscii As Integer)
  4706. KeyAscii = 0
  4707. End Sub
  4708. Public Sub UpdatePlayerStats()
  4709. 'fill in values for player stats box
  4710. txtNumPlanets.Text = Str(Player(Current).NumPlanets)
  4711. txtNumTroops.Text = Str(Player(Current).NumTroops)
  4712. txtNumResources.Text = Str(Player(Current).NumResources)
  4713. txtNumAssaultTroops.Text = Str(Player(Current).NumAssaultTroops)
  4714. 'redo resources/turn box
  4715. Dim h, i
  4716. i = 0
  4717. For h = 0 To 49
  4718.    If Planet(h).Owner = Current Then
  4719.         i = i + Planet(h).Resources
  4720.     End If
  4721. Next h
  4722. txtProduction.Text = Str(i)
  4723. End Sub
  4724. Public Sub Personalize()
  4725. 'set caption and player name to current player
  4726. If Current = 0 Then
  4727.    frmGameScreen.Caption = " 4000 A.D.  (Player 1)   "
  4728. ElseIf Current = 1 Then
  4729.    frmGameScreen.Caption = " 4000 A.D.  (Player 2)   "
  4730. End If
  4731. If Player(1).Name = "" Then
  4732.     Player(1).Name = "?"
  4733. End If
  4734. frmGameScreen.Caption = frmGameScreen.Caption + "                            " + Player(0).Name + " vs. " + Player(1).Name
  4735. If Player(1).Name = "?" Then
  4736.     Player(1).Name = ""
  4737. End If
  4738. 'set the current player's name in the name box
  4739. txtPlayerName.Text = Player(Current).Name
  4740. End Sub
  4741. Public Sub UpdateResources()
  4742. 'at start of each turn, add up resources
  4743. 'current plus resources of each owned planet
  4744. Dim i
  4745. For i = 0 To 49
  4746.   If Planet(i).Owner = Current Then
  4747.      Player(Current).NumResources = Player(Current).NumResources + Planet(i).Resources
  4748.   End If
  4749. Next i
  4750. End Sub
  4751. Public Sub UpdateNumPlanets()
  4752. 'at start of each turn - and after getting new planets,
  4753. 'and after battles, add up number of planets owned
  4754. 'and total troops/assault troops
  4755. 'first, set numplanet to zero to avoid recounting
  4756. Player(Current).NumPlanets = 0
  4757. Player(Current).NumTroops = 0
  4758. Player(Current).NumAssaultTroops = 0
  4759. Dim i
  4760. For i = 0 To 49
  4761.   If Planet(i).Owner = Current Then
  4762.      Player(Current).NumPlanets = Player(Current).NumPlanets + 1
  4763.      Player(Current).NumTroops = Player(Current).NumTroops + Planet(i).Troops
  4764.      Player(Current).NumAssaultTroops = Player(Current).NumAssaultTroops + Planet(i).AssaultTroops
  4765.   End If
  4766. Next i
  4767. End Sub
  4768. Public Sub ReInitializeShip(activeship As Integer)
  4769. 'set all the values to zero, not launched, etc
  4770. 'using ActiveShip as the indicator
  4771. With Player(Current).Ship(activeship)
  4772.     .Launched = False
  4773.     .Troops = 0
  4774.     .AssaultTroops = 0
  4775.     .CombatStrength = 0
  4776.     .HaveShields = False
  4777.     .HaveWeapons = False
  4778.     .HaveCloakingDevice = False
  4779.     .Sabotage = False
  4780.     .WarpPosition = 0
  4781.     .Coordinate = ""
  4782.     .CenterX = 0
  4783.     .CenterY = 0
  4784. End With
  4785. End Sub
  4786. Public Sub ReInitializePlanet(Index As Integer)
  4787. 'add the players stuff to the planet
  4788. Planet(Index).Troops = Player(Current).Ship(activeship).Troops
  4789. Planet(Index).AssaultTroops = Player(Current).Ship(activeship).AssaultTroops
  4790. End Sub
  4791. Public Sub EraseCircles()
  4792. 'redraw the circles to erase them
  4793. '***Only erases yellow circles!!!
  4794. Dim xpos, ypos, radius
  4795. Dim z
  4796.     For z = 0 To 49
  4797.     If Planet(z).InRange And picPlanet(z).Visible Then
  4798.         'find center of the picturebox and draw circle
  4799.         xpos = picPlanet(z).Left + (picPlanet(z).Width / 2)
  4800.         ypos = picPlanet(z).Top + (picPlanet(z).Height / 2)
  4801.         radius = (picPlanet(z).Width / 2) + 45
  4802.         'set drawmode
  4803.         picGalaxy.DrawMode = 7
  4804.         picGalaxy.DrawWidth = 1
  4805.         picGalaxy.Circle (xpos, ypos), radius, vbYellow
  4806.     End If
  4807.     Next z
  4808. 'reset the inrange value to false to prevent screwy drawing
  4809. For z = 0 To 49
  4810.     Planet(z).InRange = False
  4811. Next z
  4812. 'set the readytoland value to false to prevent screwy drawing...
  4813. ReadyToLand1 = False
  4814. ReadyToLand2 = False
  4815. End Sub
  4816. Private Sub txtTurnNumber_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4817. txtStatus.Text = " "
  4818. End Sub
  4819. Public Sub ClearFrame()
  4820. 'clear up the management frame - set everything to zero etc.
  4821. 'reset the scroll bar and labels
  4822. hsbQuantity.Enabled = False
  4823. lblItemName.Caption = ""
  4824. lblQuantity.Caption = ""
  4825. txtTotal.Text = ""
  4826. 'reset the purchase price to zero
  4827. '**this is used to initialize txtTotal.text
  4828. PurchasePrice = 0
  4829. 'disable the management and ship frames again
  4830. cmdPlanetName.Caption = ""
  4831. fraUpgrade.Enabled = False
  4832. cmdOK.Enabled = False
  4833. 'turn off scanner
  4834. If ScannerOn Then
  4835.     cmdScan_Click
  4836.     ScannerOn = False
  4837.     cmdScan.Enabled = False
  4838. End If
  4839. If RegenerateOn Then
  4840.     RegenerateOn = False
  4841.     cmdRegenerate.Enabled = False
  4842. End If
  4843. If BioRocketOn Then
  4844.     BioRocketOn = False
  4845. End If
  4846. 'turn off all the buttons
  4847. cmdRepairIndustry.Enabled = False
  4848. cmdLaunchBioRocket.Enabled = False
  4849. cmdRegenerate.Enabled = False
  4850. cmdCleanup.Enabled = False
  4851. 'deal with landing buttons - conflict with scanner button
  4852. If ReadyToLand1 Then
  4853.     cmdLandShip1_Click
  4854. End If
  4855. If ReadyToLand2 Then
  4856.     cmdLandShip2_Click
  4857. End If
  4858. End Sub
  4859. Public Sub CheckForAliens()
  4860. 'see if weak planet is attacked by aliens
  4861. Dim ChanceOfInvasion
  4862. Dim Result As Integer
  4863. Dim X As Integer
  4864. Dim PlanetCS As Integer
  4865. Dim AlienCS As Integer
  4866. '*****************
  4867. '**Experimented with increasing minimums as game went on,
  4868. '**but decided it would affect play balance too much
  4869. 'Dim MinTroops As Integer    'threshold # for invasion test
  4870. 'Dim MinMechs As Integer
  4871. 'calculate the strength of planet that is weak enough for invasion
  4872. 'MinTroops = Int(Rnd * (TurnNumber / 5)) + 2
  4873. 'MinMechs = Int(Rnd * (TurnNumber / 8)) + 1
  4874. '******************
  4875. Randomize
  4876. For X = 0 To 49
  4877.     If Planet(X).Owner = Current Then
  4878.         If Planet(X).Troops < 4 And Planet(X).AssaultTroops < 2 Then
  4879.             '5-15% chance
  4880.             ChanceOfInvasion = Int(Rnd * 10) + 5
  4881.             Result = Int(Rnd * 100) + 1
  4882.             
  4883.             If Result <= ChanceOfInvasion Then
  4884.                 'planet attacked
  4885.                 'compare combatstrengths
  4886.                 '***Alien strength builds with turn number!
  4887.                 AlienCS = Int(Rnd * 10) + Int(TurnNumber / 3)
  4888.                 
  4889.                 If AlienCS > Planet(X).CombatStrength Then
  4890.                     'Aliens Win
  4891.                     With Planet(X)
  4892.                         .Owner = Alien
  4893.                         .Troops = AlienCS - Planet(X).CombatStrength
  4894.                         .Resources = Int(Rnd * 6) + 1
  4895.                     End With
  4896.                     SetCombatStrength (X)
  4897.                     'MsgBox Planet(X).Name + " Overrun By The Melnikons!", vbOKOnly + vbExclamation, "Alien Invasion!"
  4898.                     '******
  4899.                     'Set various messages for overrun
  4900.                     Dim alternate1 As String
  4901.                     Dim alternate2 As String
  4902.                     Dim alternate3 As String
  4903.                     Dim alternate4 As String
  4904.                     Dim choice As Integer
  4905.                     Randomize
  4906.                     choice = Int(Rnd * 4) + 1
  4907.                     
  4908.                     alternate1 = "Defenses Breached...Casualties Mounting..."
  4909.                     alternate2 = "Security Perimeter Down...Shields Failed"
  4910.                     alternate3 = "Warning Systems Sabotaged...Need Help!..."
  4911.                     alternate4 = "They're Everywhere! If we can just--"
  4912.                     MessageType = "Overrun"
  4913.                     Announceline1 = "Melnikon Invasion Reported On " + Planet(X).Name + "!"
  4914.                     Select Case choice
  4915.                     Case 1
  4916.                         Announceline2 = alternate1
  4917.                     Case 2
  4918.                         Announceline2 = alternate2
  4919.                     Case 3
  4920.                         Announceline2 = alternate3
  4921.                     Case 4
  4922.                         Announceline2 = alternate4
  4923.                     End Select
  4924.                     Announceline3 = "<End Of Transmission>"
  4925.                     frmAnnounce.Show Modal
  4926.                     
  4927.                 ElseIf AlienCS <= Planet(X).CombatStrength Then
  4928.                     'Player Wins
  4929.                     Dim Msg As String
  4930.                     Msg = "Melnikon Invasion Force Destroyed!"
  4931.                                      
  4932.                     AlienCS = Int(AlienCS / 2)
  4933.                     'lose troops if any
  4934.                     If Planet(X).Troops > 0 Then
  4935.                         Planet(X).Troops = Planet(X).Troops - AlienCS
  4936.                         If Planet(X).Troops < 0 Then
  4937.                             Planet(X).Troops = 0
  4938.                         End If
  4939.                     End If
  4940.                     
  4941.                     'lose some mechs if any
  4942.                     If Planet(X).AssaultTroops > 0 Then
  4943.                         Planet(X).AssaultTroops = Planet(X).AssaultTroops - Int(AlienCS / 2)
  4944.                         If Planet(X).AssaultTroops < 0 Then
  4945.                             Planet(X).AssaultTroops = 0
  4946.                         End If
  4947.                     End If
  4948.                     
  4949.                     SetCombatStrength (X)
  4950.                     
  4951.                     MessageType = "Victorious"
  4952.                     Announceline1 = "Melnikon Invasion of " + Planet(X).Name + " Defeated!"
  4953.                     If Planet(X).Owner = Current Then
  4954.                         Announceline2 = "Troop Losses:" + Str(AlienCS)
  4955.                         Announceline3 = "Mech Losses:" + Str(Int(AlienCS / 2))
  4956.                     Else
  4957.                         Announceline2 = ""
  4958.                         Announceline3 = ""
  4959.                     End If
  4960.                     frmAnnounce.Show Modal
  4961.                     'MsgBox Msg, vbOKOnly + vbExclamation, "Report From " + Planet(X).Name
  4962.                     'Debug.Print "AlienCS/2:" + Str(AlienCS)
  4963.                 End If
  4964.             End If
  4965.         End If
  4966.     End If
  4967. Next X
  4968. End Sub
  4969. Public Sub AttackAliens(Index As Integer)
  4970. 'attack procedure when landing on alien planets
  4971. Dim RandomLosses
  4972. Dim a, b
  4973. 'set random number generator
  4974. Randomize
  4975.             
  4976. 'set placeholder for current player's combat strength
  4977. AttackStrength = Player(Current).Ship(activeship).CombatStrength
  4978. DefenceStrength = Planet(Index).CombatStrength
  4979.             
  4980. a = Player(Current).Ship(activeship).Troops
  4981. b = Player(Current).Ship(activeship).AssaultTroops
  4982. 'set placeholders for troops on the planet
  4983. Dim c, d
  4984. c = Planet(Index).Troops
  4985. d = Planet(Index).AssaultTroops
  4986. PlaySoundEffect "Attack"
  4987. 'MsgBox "Attack!", , " "
  4988.                        
  4989. 'compare the strengths
  4990. If AttackStrength > DefenceStrength Then
  4991.     'ATTACKER WINS
  4992.     'don't allow player to launch from this planet this turn
  4993.     Planet(Index).JustLanded = True
  4994.                 
  4995.     If a > 0 And DefenceStrength > 0 Then
  4996.         'winner loses 10-50% of troops
  4997.         RandomLosses = Int(Rnd * 4) + 1
  4998.         RandomLosses = RandomLosses / 10
  4999.         a = a - (a * RandomLosses)
  5000.         TroopLosses = RandomLosses * 100
  5001.     End If
  5002.                                                
  5003.     If b > 0 And DefenceStrength > 0 Then
  5004.         'winner loses 10-30% of assault troops
  5005.         RandomLosses = Int(Rnd * 3) + 1
  5006.         RandomLosses = RandomLosses / 10
  5007.         b = b - (b * RandomLosses)
  5008.         AssaultLosses = RandomLosses * 100
  5009.     End If
  5010.                                                               
  5011.     'planet troops, combatstrength changes
  5012.     Planet(Index).Troops = a
  5013.     Planet(Index).AssaultTroops = b
  5014.     'set this variable for frmlandscape:
  5015.     ActivePlanet = Index
  5016.     'show the results of the battle
  5017.     frmLandscape.Show Modal
  5018.                 
  5019.     'planet changes owners
  5020.     Planet(Index).Owner = Current
  5021.                                 
  5022.     'set planet's combat strength
  5023.     SetCombatStrength (Index)
  5024.                 
  5025.     'update player: resources, numplanets
  5026.     UpdateNumPlanets
  5027.     UpdatePlayerStats
  5028.             
  5029.     'clear the management frame
  5030.     ClearFrame
  5031.     cmdPreviewShip1.Enabled = True
  5032.     cmdPreviewShip2.Enabled = True
  5033.     cmdPreviewEnemy1.Enabled = True
  5034.     cmdPreviewEnemy2.Enabled = True
  5035.     '************************************
  5036. ElseIf AttackStrength <= Planet(Index).CombatStrength Then
  5037.     'defender wins, and tie goes to the defender
  5038.                
  5039.     'current player loses all troops
  5040.     Player(Current).NumTroops = Player(Current).NumTroops - a
  5041.     Player(Current).NumAssaultTroops = Player(Current).NumAssaultTroops - b
  5042.                         
  5043.     If Planet(Index).Troops > 0 Then
  5044.         'winner loses 10-50% of troops
  5045.         RandomLosses = Int(Rnd * 4) + 1
  5046.         RandomLosses = RandomLosses / 10
  5047.         c = c - (c * RandomLosses)
  5048.         TroopLosses = RandomLosses * 100
  5049.                     
  5050.         Planet(Index).Troops = c
  5051.     End If
  5052.                 
  5053.     If Planet(Index).AssaultTroops > 0 Then
  5054.         'winner loses 10-40% of assault troops
  5055.         RandomLosses = Int(Rnd * 4) + 1
  5056.         RandomLosses = RandomLosses / 10
  5057.         d = d - (d * RandomLosses)
  5058.         AssaultLosses = RandomLosses * 100
  5059.         Planet(Index).AssaultTroops = d
  5060.     End If
  5061.                                   
  5062.     'update planet's combat strength
  5063.     SetCombatStrength (Index)
  5064.     UpdateNumPlanets
  5065.     UpdatePlayerStats
  5066.                       
  5067.     'clear management frame
  5068.     ClearFrame
  5069.     cmdPreviewShip1.Enabled = True
  5070.     cmdPreviewShip2.Enabled = True
  5071.     cmdPreviewEnemy1.Enabled = True
  5072.     cmdPreviewEnemy2.Enabled = True
  5073.     'set this variable for frmlandscape:
  5074.     ActivePlanet = Index
  5075.                 
  5076.     'show the results of the battle
  5077.     frmLandscape.Show Modal
  5078.                              
  5079. End If
  5080.             
  5081. 'disable the landing button and remove from warp path
  5082. If activeship = 0 Then
  5083.     cmdLandShip1.Enabled = False
  5084.     'get rid of the ship picture
  5085.     picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  5086. ElseIf activeship = 1 Then
  5087.     cmdLandShip2.Enabled = False
  5088.     'get rid of the ship picture
  5089.     picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  5090. End If
  5091.             
  5092. 'set ship values to unlaunched and empty
  5093. ReInitializeShip (activeship)
  5094. RefreshWarpPath
  5095. End Sub
  5096. Public Sub SabotageLanding(Index As Integer, activeship As Integer)
  5097. 'determine results of sabotage mission
  5098. Dim CurrentPlayer, Enemy
  5099. CurrentPlayer = Current
  5100. Enemy = Other
  5101. Select Case Planet(Index).Owner
  5102. Case CurrentPlayer
  5103.     'do nothing, mission wasted by landing on player's own planet
  5104.     PlaySoundEffect "Quiet"
  5105.     MsgBox "Mission aborted", vbOKOnly, " "
  5106. Case Enemy
  5107.     Dim Success As Integer
  5108.     Dim Result As Integer
  5109.     Success = 95
  5110.     'success varies with number of troops, mechs and technology on planet
  5111.     Select Case Planet(Index).Troops
  5112.     Case 0 To 5
  5113.         Success = Success - 1
  5114.     Case 6 To 10
  5115.         Success = Success - 2
  5116.     Case 11 To 15
  5117.         Success = Success - 4
  5118.     Case Else
  5119.         Success = Success - 6
  5120.     End Select
  5121.     'mechs
  5122.     Select Case Planet(Index).AssaultTroops
  5123.     Case 0 To 1
  5124.         Success = Success - 1
  5125.     Case 2 To 5
  5126.         Success = Success - 3
  5127.     Case Else
  5128.         Success = Success - 5
  5129.     End Select
  5130.     'missiles
  5131.     If Planet(Index).HaveMissiles Then
  5132.         'check what level of missiles other player has researched
  5133.         If Player(Other).Missile2Researched Then
  5134.             Success = Success - 4
  5135.         Else
  5136.             Success = Success - 2
  5137.         End If
  5138.     End If
  5139.     If Planet(Index).HaveShields Then
  5140.         Success = Success - 3
  5141.     End If
  5142.     If Planet(Index).HaveScanner Then
  5143.         Success = Success - 5
  5144.     End If
  5145.     Result = Int(Rnd * 100)
  5146.     Debug.Print "Result: ", Result, " Success: ", Success
  5147.     If Result <= Success Then
  5148.         'mission successful
  5149.         
  5150.         Dim Damage As Integer
  5151.         Dim Reduction
  5152.         Dim FactoryFlag As Boolean
  5153.         Dim msg1 As String
  5154.         Dim msg2 As String
  5155.         
  5156.         msg1 = "Advanced production facilities destroyed!"
  5157.         msg2 = "Planet's resource production eliminated!"
  5158.         Damage = Int(Rnd * 4) + 2  '2-6 damage
  5159.         
  5160.         If Planet(Index).ImprovedResources Then
  5161.             'factory destroyed
  5162.             Planet(Index).ImprovedResources = False
  5163.             FactoryFlag = True
  5164.             'tell other player his factory destroyed
  5165.             Planet(Index).SabotagedFactory = True
  5166.         End If
  5167.         
  5168.         'Fixes divide by zero error!!
  5169.         If Planet(Index).Resources < 1 Then
  5170.             Reduction = -1          'NOTE: if the same planet is sabotaged twice in 1 turn
  5171.                                     'there may not be a message to the other player if the
  5172.                                     'first sabotage reduced resources to zero
  5173.         Else
  5174.             Reduction = Damage / Planet(Index).Resources
  5175.             Reduction = Int(Reduction * 100)
  5176.         End If
  5177.         
  5178.         Planet(Index).Resources = Planet(Index).Resources - Damage
  5179.         
  5180.         If Planet(Index).Resources < 0 Then
  5181.             Planet(Index).Resources = 0
  5182.         End If
  5183.         
  5184.         If Planet(Index).Resources > 0 And FactoryFlag Then
  5185.             PlaySoundEffect "Quiet"
  5186.             MsgBox "Mission accomplished!" + Chr(13) + msg1 + Chr(13) + "Resource production reduced by " + Str(Reduction) + "%", vbOKOnly, "Sabotage Mission Results"
  5187.         ElseIf Planet(Index).Resources > 0 And Not FactoryFlag Then
  5188.             PlaySoundEffect "Quiet"
  5189.             MsgBox "Resource production on " + Planet(Index).Name + " crippled!" + Chr(13) + "Resource production reduced by" + Str(Reduction) + "%", vbOKOnly, "Sabotage Mission Results"
  5190.         ElseIf Planet(Index).Resources <= 0 Then
  5191.             PlaySoundEffect "Quiet"
  5192.             MsgBox msg2, , "Sabotage Mission Results"
  5193.         End If
  5194.         
  5195.         '***should set flag to give other player message at startup
  5196.         Planet(Index).Sabotaged = True
  5197.               
  5198.         Planet(Index).SabotageReduction = Reduction
  5199.         
  5200.         'set flag to enable cmdRepairIndustry
  5201.         Planet(Index).Damaged = True
  5202.         
  5203.     ElseIf Result > Success Then
  5204.         'MISSION FAILED
  5205.         
  5206.         PlaySoundEffect "Quiet"
  5207.         MsgBox "Mission failed - ship destroyed in orbit around " + Planet(Index).Name, vbOKOnly, "Sabotage Mission Results"
  5208.         'set flag to tell other player next turn
  5209.         Planet(Index).Sabotaged = True
  5210.         Planet(Index).SabotageReduction = 0 'this will show that mission failed, show different message
  5211.         Planet(Index).SabotagedFactory = False 'factory not destroyed
  5212.     End If
  5213. Case Neutral
  5214.     'do nothing
  5215.     PlaySoundEffect "Quiet"
  5216.     MsgBox "Mission failed - neutral planet", vbOKOnly, "Sabotage Mission Results"
  5217. Case Alien
  5218.     'reduce resources to 0
  5219.     Planet(Index).Resources = 0
  5220.     PlaySoundEffect "Quiet"
  5221.     MsgBox "Alien resource production facilities destroyed", vbOKOnly + vbExclamation, "Sabotage Mission Results"
  5222. End Select
  5223. EraseShip:
  5224.             'disable the landing button and remove from warp path
  5225.             If activeship = 0 Then
  5226.                 cmdLandShip1.Enabled = False
  5227.                 'get rid of the ship picture
  5228.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  5229.             End If
  5230.             
  5231.             If activeship = 1 Then
  5232.                 cmdLandShip2.Enabled = False
  5233.                 'get rid of the ship picture
  5234.                 picPlayerPath(Player(Current).Ship(activeship).WarpPosition - 1).Picture = LoadPicture()
  5235.             End If
  5236.             
  5237.             'set ship values to unlaunched and empty
  5238.             ReInitializeShip (activeship)
  5239.             
  5240.             RefreshWarpPath
  5241.             
  5242. End Sub
  5243. Public Sub BioDamage(X As Integer)
  5244. 'this happens every turn on contaminated planets
  5245. Randomize
  5246. If Planet(X).Troops = 0 Or Planet(X).BioRocketETA = TurnNumber Then
  5247.     Exit Sub
  5248. End If
  5249. If Planet(X).Troops <= 2 Then
  5250.     Planet(X).Troops = Planet(X).Troops - 1
  5251.     If Planet(X).Troops <= 0 Then
  5252.        PlaySoundEffect "Quiet"
  5253.        MsgBox "Contamination warning: all troops dead.", vbOKOnly + vbExclamation, "Report From: " + Planet(X).Name
  5254.        Planet(X).Troops = 0
  5255.        Exit Sub
  5256.     End If
  5257.     'don't show msgbox if it's the same turn the rocket hits
  5258.     If Planet(X).BioRocketETA = TurnNumber Then
  5259.         'do nothing
  5260.     Else
  5261.         PlaySoundEffect "Warning"
  5262.         MsgBox "Contamination warning: 1 troop dead.", vbOKOnly + vbExclamation, "Report From: " + Planet(X).Name
  5263.     End If
  5264. ElseIf Planet(X).Troops > 2 Then
  5265.     Dim Damage As Integer
  5266.     Dim Dead As Integer
  5267.     'kill of 25-50% of troops
  5268.     Damage = Int(Rnd * 25) + 25
  5269.     'Damage = Damage / 100
  5270.     Dead = Int(Planet(X).Troops * Damage)
  5271.     Dead = Int(Dead / 100)
  5272.     'should be at least 1 dead per turn
  5273.     If Dead < 1 Then
  5274.         Dead = 1
  5275.     End If
  5276.     Planet(X).Troops = Planet(X).Troops - Dead
  5277.     Dim msg1 As String
  5278.     If Dead = 1 Then
  5279.         msg1 = " troop dead."
  5280.     Else
  5281.         msg1 = " troops dead."
  5282.     End If
  5283.     If Planet(X).BioRocketETA = TurnNumber Then
  5284.         'do nothing
  5285.     Else
  5286.         PlaySoundEffect "Warning"
  5287.         MsgBox "Contamination warning: " + Str(Dead) + msg1, vbOKOnly + vbExclamation, "Report From: " + Planet(X).Name
  5288.     End If
  5289. End If
  5290. End Sub
  5291. Public Sub EraseLines()
  5292. 'redraw the lines to erase them
  5293. Dim x1, y1
  5294. Dim z As Integer
  5295. For z = 0 To 49
  5296.     If Planet(z).LaunchSite Then
  5297.         x1 = picPlanet(z).Left + (picPlanet(z).Width / 2)
  5298.         y1 = picPlanet(z).Top + (picPlanet(z).Height / 2)
  5299.         Exit For
  5300.     End If
  5301. Next z
  5302. Dim X2, Y2
  5303. For z = 0 To 49
  5304.     If Planet(z).InBioRange Then
  5305.         'find center of the picturebox and draw line
  5306.         X2 = picPlanet(z).Left + (picPlanet(z).Width / 2)
  5307.         Y2 = picPlanet(z).Top + (picPlanet(z).Height / 2)
  5308.         'set drawmode
  5309.         picGalaxy.DrawMode = 7
  5310.         picGalaxy.DrawWidth = 2
  5311.         
  5312.         picGalaxy.Line (x1, y1)-(X2, Y2), vbMagenta
  5313.     End If
  5314. Next z
  5315. 'reset the inbiorange value to false to prevent screwy drawing
  5316. For z = 0 To 49
  5317.     Planet(z).InBioRange = False
  5318. Next z
  5319. 'reset the launchsite to false
  5320. For z = 0 To 49
  5321.     If Planet(z).LaunchSite Then
  5322.         Planet(z).LaunchSite = False
  5323.         Exit For
  5324.     End If
  5325. Next z
  5326. 'reset biorocketon to false
  5327. BioRocketOn = False
  5328. End Sub
  5329. Public Sub TargetBioRocket(Index As Integer)
  5330. 'let player know how long it will take for biorocket to reach target
  5331. Dim ETA As Integer
  5332. Dim RocketCost As Integer
  5333. RocketCost = 30
  5334. 'final cost check
  5335. If BioRocketOn Then
  5336.     'continue with sub
  5337.     ETA = Int(Planet(Index).BioDistance / 300)
  5338.     Planet(Index).BioRocketETA = TurnNumber + ETA
  5339.     If SoundOn Then
  5340.         'select which turn# sound file to play
  5341.         Select Case ETA
  5342.         Case 1
  5343.            Sound = App.Path + "\1turn.wav"
  5344.            sndPlaySound Sound, 3
  5345.         Case 2
  5346.            Sound = App.Path + "\2turns.wav"
  5347.            sndPlaySound Sound, 3
  5348.         Case 3
  5349.             Sound = App.Path + "\3turns.wav"
  5350.             sndPlaySound Sound, 3
  5351.         Case 4
  5352.            Sound = App.Path + "\4turns.wav"
  5353.            sndPlaySound Sound, 3
  5354.         Case 5
  5355.            Sound = App.Path + "\5turns.wav"
  5356.            sndPlaySound Sound, 3
  5357.         Case 6
  5358.            Sound = App.Path + "\6turns.wav"
  5359.            sndPlaySound Sound, 3
  5360.         Case 7
  5361.            Sound = App.Path + "\7turns.wav"
  5362.            sndPlaySound Sound, 3
  5363.         End Select
  5364.         
  5365.     End If
  5366.     PlaySoundEffect "Button3"
  5367.     MsgBox "Planet " + Planet(Index).Name + " targeted." + Chr(13) + Chr(13) + "BioHazard Rocket ETA:" + Str(ETA) + " Turns.", , " "
  5368.     'deduct funds
  5369.     Player(Current).NumResources = Player(Current).NumResources - RocketCost
  5370.     UpdatePlayerStats
  5371.     'erase lines and reset launchsite to false
  5372.     EraseLines
  5373.     'clear frame
  5374.     ClearFrame
  5375.     Exit Sub
  5376. End If
  5377. End Sub
  5378. Public Sub WriteBigFile()
  5379. 'save all the general info - message to other player...
  5380. Dim Filename As String
  5381. Dim ShortName As String
  5382. ShortName = "\gameinfo.txt"
  5383. Filename = App.Path & ShortName
  5384. 'get a free file number
  5385. gFileNum = FreeFile
  5386. 'create the file
  5387. Open Filename For Output As gFileNum
  5388. 'write galaxysize
  5389. Write #gFileNum, GalaxySize
  5390. 'write the planet data
  5391. Dim i
  5392. For i = 0 To 49
  5393.   Write #gFileNum, Planet(i).Name, Planet(i).Owner, Planet(i).Troops, _
  5394.   Planet(i).AssaultTroops, Planet(i).CombatStrength, Planet(i).Coordinate, _
  5395.   Planet(i).Resources, Planet(i).HaveMissiles, Planet(i).HaveShields, _
  5396.   Planet(i).ImprovedResources, Planet(i).HaveScanner, Planet(i).BackGround, _
  5397.   Planet(i).HaveJammer, Planet(i).BioRocketETA, Planet(i).Contaminated, Planet(i).NukedResources, _
  5398.   Planet(i).Sabotaged, Planet(i).SabotageReduction, Planet(i).SabotagedFactory, Planet(i).Damaged, _
  5399.   Planet(i).BioFailed
  5400. 'write the player data
  5401. For i = 0 To 1
  5402.   Write #gFileNum, Current, TurnNumber, Player(i).Name, Player(i).NumTroops, Player(i).NumAssaultTroops, Player(i).NumPlanets, Player(i).NumResources, _
  5403.   Player(i).HomePlanet, Player(i).Message1Given, Player(i).Message2Given, Player(i).WasBig, Player(i).Missile1ResearchDone, Player(i).Missile1Researched, _
  5404.   Player(i).Missile2ResearchDone, Player(i).Missile2Researched, Player(i).ShieldResearchDone, Player(i).ShieldResearched, _
  5405.   Player(i).LaserResearchDone, Player(i).LaserResearched, Player(i).PlasmaResearchDone, Player(i).PlasmaResearched, Player(i).MechResearchDone, Player(i).MechResearched, _
  5406.   Player(i).BioRocketResearchDone, Player(i).BioRocketResearched, Player(i).LongBioResearchDone, Player(i).LongBioResearched, Player(i).ShipShield1ResearchDone, Player(i).ShipShield1Researched, _
  5407.   Player(i).ShipShield2ResearchDone, Player(i).ShipShield2Researched, Player(i).BigShipResearchDone, Player(i).BigShipResearched, Player(i).UltraWarpResearchDone, Player(i).UltraWarpResearched, _
  5408.   Player(i).CloakingResearchDone, Player(i).CloakingResearched, Player(i).ResourceResearchDone, Player(i).ResourcesResearched, Player(i).BioCleanupResearchDone, Player(i).BioCleanupResearched, _
  5409.   Player(i).RegenerationResearchDone, Player(i).RegenerationResearched, Player(i).ScannerResearchDone, Player(i).ScannerResearched, Player(i).DeepScannerResearchDone, Player(i).DeepScannerResearched, _
  5410.   Player(i).JammerResearchDone, Player(i).JammerResearched, Player(i).WarpScannerResearchDone, Player(i).WarpScannerResearched
  5411. 'write the ship data
  5412. For i = 0 To 1
  5413.   Write #gFileNum, Player(0).Ship(i).Launched, Player(0).Ship(i).HaveCloakingDevice, _
  5414.   Player(0).Ship(i).Troops, Player(0).Ship(i).AssaultTroops, _
  5415.   Player(0).Ship(i).CombatStrength, Player(0).Ship(i).WarpPosition, _
  5416.   Player(0).Ship(i).Coordinate, Player(0).Ship(i).CenterX, _
  5417.   Player(0).Ship(i).CenterY, Player(0).Ship(i).ShipNumber, Player(0).Ship(i).Sabotage, _
  5418.   Player(1).Ship(i).Launched, Player(1).Ship(i).HaveCloakingDevice, _
  5419.   Player(1).Ship(i).Troops, Player(1).Ship(i).AssaultTroops, _
  5420.   Player(1).Ship(i).CombatStrength, Player(1).Ship(i).WarpPosition, _
  5421.   Player(1).Ship(i).Coordinate, Player(1).Ship(i).CenterX, _
  5422.   Player(1).Ship(i).CenterY, Player(1).Ship(i).ShipNumber, Player(1).Ship(i).Sabotage
  5423. 'write the general data
  5424. Write #gFileNum, OutgoingMessage, Player(Current).WasBig
  5425. 'captured planet data
  5426. Write #gFileNum, NumPlanetsCaptured
  5427. For i = 0 To 49
  5428.     Write #gFileNum, Planet(i).Captured
  5429. Next i
  5430. 'failed invasion data
  5431. Write #gFileNum, NumFailedInvasions
  5432. For i = 0 To 49
  5433.     Write #gFileNum, Planet(i).FailedInvasion, Planet(i).FailedInvasionTroopLosses, Planet(i).FailedInvasionMechLosses
  5434. Next i
  5435. 'close the file
  5436. Close gFileNum
  5437. End Sub
  5438. Public Sub Detonation(X As Integer)
  5439. Randomize
  5440. 'see if rocket hits, or is shot down by planet defenses
  5441. Dim Success As Integer
  5442. Dim Result As Integer
  5443. 'set base chance of success
  5444. Success = 100
  5445. 'success varies with technology on planet
  5446. If Planet(X).HaveMissiles Then
  5447.     If Player(Current).Missile1Researched Then
  5448.         Success = Success - 2
  5449.     End If
  5450.     If Player(Current).Missile2Researched Then
  5451.         Success = Success - 3
  5452.     End If
  5453. End If
  5454. If Planet(X).HaveShields Then
  5455.     Success = Success - 7
  5456. End If
  5457. If Planet(X).HaveScanner Then
  5458.    Success = Success - 2
  5459. End If
  5460. Result = Int(Rnd * 100)
  5461. If Result <= Success Then
  5462.     'rocket hits
  5463.     'explosion - kills troops and drastically reduces resource production
  5464.     If Planet(X).Owner = Current Then   'duh!
  5465.         'tally the damage to troops and resources
  5466.         If Planet(X).Troops > 0 Then
  5467.             Randomize
  5468.             Dim Damage As Integer
  5469.             Dim Dead As Integer
  5470.      
  5471.             'kill of 25-50% of troops
  5472.             Damage = Int(Rnd * 25) + 25
  5473.             Dead = Int(Planet(X).Troops * Damage)
  5474.             Dead = Int(Dead / 100)
  5475.             'should be at least 1 killed/turn
  5476.             If Dead < 1 Then
  5477.                 Dead = 1
  5478.             End If
  5479.             Planet(X).Troops = Planet(X).Troops - Dead
  5480.         End If
  5481.         'resource production hurt bad
  5482.         Dim ProductionDamage        '3-8 damage to resources
  5483.         ProductionDamage = Int(Rnd * 5) + 3
  5484.         Planet(X).Resources = Planet(X).Resources - ProductionDamage
  5485.         
  5486.         If Planet(X).Resources < 0 Then
  5487.             Planet(X).Resources = 0
  5488.         End If
  5489.         'reset improved resource production to false, let them build again
  5490.         Planet(X).ImprovedResources = False
  5491.     End If  'end of if planet.owner=current loop
  5492.     'Announcement screen
  5493.     MessageType = "Explosion"
  5494.     If Planet(X).Owner = Current Then
  5495.         Announceline1 = "A Massive Explosion On " + Planet(X).Name + "!"
  5496.         Announceline2 = "Troop Losses: " + Str(Dead)
  5497.         Announceline3 = "Resource Production Reduced To:" + Str(Planet(X).Resources)
  5498.     Else
  5499.         Announceline1 = "Successful BioRocket Detonation On " + Planet(X).Name + "!"
  5500.         Announceline2 = ""
  5501.         Announceline3 = ""
  5502.     End If
  5503.     frmAnnounce.Show Modal
  5504.     Planet(X).Contaminated = True
  5505.     Planet(X).NukedResources = True
  5506.     'result > success, therefore the missile didn't detonate!
  5507.     PlaySoundEffect "Quiet"
  5508.     MsgBox "BioRocket destroyed by defensive systems on " + Planet(X).Name + "!"
  5509.     'Debug.Print "Result:"; Result, "Success:"; Success
  5510.     'set warning to show other player on their next turn
  5511.     Planet(X).BioFailed = True
  5512. End If
  5513. End Sub
  5514. Public Sub RefreshWarpPath()
  5515. 'put ships on the warp path with coordinates printed below
  5516. Dim z     'counter
  5517. Dim j, k  'hold warp positions - easier to type & read
  5518. j = Player(Current).Ship(0).WarpPosition
  5519. k = Player(Current).Ship(1).WarpPosition
  5520. If Player(Current).Ship(0).Launched And Player(Current).Ship(1).Launched And j = k Then
  5521.     'both ships on same warp box
  5522.     'check if in 2nd to last box
  5523.     If j = 7 And Warp7WarningGiven = False Then
  5524.         Dim Msg As String
  5525.         Msg = "Your ships must land next turn. Be advised" + Chr(13)
  5526.         Msg = Msg + "of the risk that no suitable planet will be" + Chr(13)
  5527.         Msg = Msg + "in range before the warp path disintegrates."
  5528.         'play warning and show message
  5529.         PlaySoundEffect "Disintegrate"
  5530.         MsgBox Msg, vbOKOnly + vbExclamation, "Warp Path Warning"
  5531.         Warp7WarningGiven = True
  5532.     End If
  5533.     'check if in last warp box
  5534.     If j = 8 And Warp8WarningGiven = False Then
  5535.         PlaySoundEffect "Disintegrate"
  5536.         LostInSpace
  5537.         If NumPlanets1 = 0 Then
  5538.             PlaySoundEffect "Warning"
  5539.             MsgBox "Ship 1 Destroyed", vbCritical, "Warp Path Disintegration"
  5540.             ReInitializeShip (0)
  5541.         End If
  5542.         
  5543.         If NumPlanets2 = 0 Then
  5544.             PlaySoundEffect "Warning"
  5545.             MsgBox "Ship 2 Destroyed", vbCritical, "Warp Path Disintegration"
  5546.             ReInitializeShip (1)
  5547.         End If
  5548.         
  5549.         If NumPlanets1 > 0 And NumPlanets2 > 0 Then
  5550.             PlaySoundEffect "Warning"
  5551.             MsgBox "Your ships must land this turn", vbOKOnly + vbCritical, "Warp Path Disintegrating!"
  5552.         End If
  5553.         Warp8WarningGiven = True
  5554.         'this is a flag to only show this warning once at the start
  5555.         'and once at the end of the turn
  5556.     End If
  5557.     picPlayerPath(j - 1).Picture = picTiny.Picture
  5558.     'set ship 1 coordinate on top left
  5559.     picPlayerPath(j - 1).CurrentX = 0
  5560.     picPlayerPath(j - 1).CurrentY = 0
  5561.     picPlayerPath(j - 1).Print Player(Current).Ship(0).Coordinate
  5562.     '***Put an S instead of CS if a sabotage mission
  5563.     If Player(Current).Ship(0).Sabotage Then
  5564.         picPlayerPath(j - 1).CurrentX = 450
  5565.         picPlayerPath(j - 1).CurrentY = 0
  5566.         picPlayerPath(j - 1).FontBold = True
  5567.         picPlayerPath(j - 1).Print "S"
  5568.         picPlayerPath(j - 1).FontBold = False
  5569.     Else
  5570.         'ship 1 CS on top right
  5571.         '***change currentx depending on value of CS
  5572.         If Player(Current).Ship(0).CombatStrength > 99 Then
  5573.             picPlayerPath(j - 1).CurrentX = 300
  5574.         ElseIf Player(Current).Ship(0).CombatStrength > 9 Then
  5575.             picPlayerPath(j - 1).CurrentX = 360
  5576.         Else
  5577.             picPlayerPath(j - 1).CurrentX = 440
  5578.         End If
  5579.         '***
  5580.         picPlayerPath(j - 1).CurrentY = 0
  5581.         picPlayerPath(j - 1).Print Player(Current).Ship(0).CombatStrength
  5582.     End If
  5583.     'set ship 2 coordinate at bottom left corner
  5584.     picPlayerPath(j - 1).CurrentX = 0
  5585.     picPlayerPath(j - 1).CurrentY = 465
  5586.     picPlayerPath(j - 1).Print Player(Current).Ship(1).Coordinate
  5587.         
  5588.     '***print S if a sabotage mission
  5589.     If Player(Current).Ship(1).Sabotage Then
  5590.         picPlayerPath(j - 1).CurrentX = 450
  5591.         picPlayerPath(j - 1).CurrentY = 465
  5592.         picPlayerPath(j - 1).FontBold = True
  5593.         picPlayerPath(j - 1).Print "S"
  5594.         picPlayerPath(j - 1).FontBold = False
  5595.     Else
  5596.         'set ship 2 CS at bottom right corner
  5597.         '***change currentx depending on value of CS
  5598.         If Player(Current).Ship(1).CombatStrength > 99 Then
  5599.             picPlayerPath(j - 1).CurrentX = 300
  5600.         ElseIf Player(Current).Ship(1).CombatStrength > 9 Then
  5601.             picPlayerPath(j - 1).CurrentX = 360
  5602.         Else
  5603.             picPlayerPath(j - 1).CurrentX = 440
  5604.         End If
  5605.         '***
  5606.         picPlayerPath(j - 1).CurrentY = 465
  5607.         picPlayerPath(j - 1).Print Player(Current).Ship(1).CombatStrength
  5608.     End If
  5609. 'ships not in same box
  5610. For z = 0 To 1
  5611.     If Player(Current).Ship(z).Launched Then
  5612.         j = Player(Current).Ship(z).WarpPosition
  5613.         'check if in 2nd to last box
  5614.         If j = 7 And Warp7WarningGiven = False Then
  5615.             Dim message As String
  5616.             message = "Your ship must land next turn. Be advised" + Chr(13)
  5617.             message = message + "of the risk that no suitable planet will be" + Chr(13)
  5618.             message = message + "in range before the warp path disintegrates."
  5619.             PlaySoundEffect "Warning"
  5620.             MsgBox message, vbOKOnly + vbExclamation, "Warp Path Warning"
  5621.             Warp7WarningGiven = True
  5622.         End If
  5623.         'check if in last warp box
  5624.         If j = 8 And Warp8WarningGiven = False Then
  5625.             PlaySoundEffect "Disintegrate"
  5626.             LostInSpace
  5627.             If NumPlanets1 = 0 Then
  5628.                 PlaySoundEffect "Warning"
  5629.                 MsgBox "Ship 1 Destroyed", vbCritical, "Warp Path Disintegration"
  5630.                 ReInitializeShip (0)
  5631.             End If
  5632.         
  5633.             If NumPlanets2 = 0 Then
  5634.                 PlaySoundEffect "Warning"
  5635.                 MsgBox "Ship 2 Destroyed", vbCritical, "Warp Path Disintegration"
  5636.                 ReInitializeShip (1)
  5637.             End If
  5638.                 
  5639.             If NumPlanets1 > 0 And NumPlanets2 > 0 Then
  5640.                 PlaySoundEffect "Warning"
  5641.                 MsgBox "Your ship must land this turn", vbOKOnly + vbCritical, "Warp Path Disintegrating!"
  5642.             End If
  5643.             
  5644.             Warp8WarningGiven = True
  5645.         End If
  5646.         
  5647.             picPlayerPath(j - 1).Picture = picTemp.Picture
  5648.             'set shipnumber at top right
  5649.             picPlayerPath(j - 1).CurrentX = 435
  5650.             picPlayerPath(j - 1).CurrentY = 0
  5651.             picPlayerPath(j - 1).Print Player(Current).Ship(z).ShipNumber + 1
  5652.             'set coordinate at bottom left corner
  5653.             picPlayerPath(j - 1).CurrentX = 50
  5654.             picPlayerPath(j - 1).CurrentY = 465
  5655.             picPlayerPath(j - 1).Print Player(Current).Ship(z).Coordinate
  5656.         
  5657.         'set cursor at bottom right corner
  5658.         '**print S if sabotage mission
  5659.         If Player(Current).Ship(z).Sabotage Then
  5660.             picPlayerPath(j - 1).CurrentX = 450
  5661.             picPlayerPath(j - 1).CurrentY = 465
  5662.             picPlayerPath(j - 1).FontBold = True
  5663.             picPlayerPath(j - 1).Print "S"
  5664.             picPlayerPath(j - 1).FontBold = False
  5665.         Else
  5666.             '***change currentx depending on value of CS
  5667.             If Player(Current).Ship(z).CombatStrength > 99 Then
  5668.                 picPlayerPath(j - 1).CurrentX = 300
  5669.             ElseIf Player(Current).Ship(z).CombatStrength > 9 Then
  5670.                 picPlayerPath(j - 1).CurrentX = 360
  5671.             Else
  5672.                 picPlayerPath(j - 1).CurrentX = 440
  5673.             End If
  5674.             '***
  5675.             picPlayerPath(j - 1).CurrentY = 465
  5676.             picPlayerPath(j - 1).Print Player(Current).Ship(z).CombatStrength
  5677.         End If
  5678.     End If
  5679. Next z
  5680. End If
  5681. If Player(Current).Ship(0).Launched Then
  5682.     cmdLandShip1.Enabled = True
  5683. ElseIf Player(Current).Ship(1).Launched Then
  5684.     cmdLandShip2.Enabled = True
  5685. End If
  5686. 'put player number under owned planets
  5687. Dim Count As Integer
  5688. For Count = 0 To 49
  5689.     If Planet(Count).Owner = Current Then
  5690.         picGalaxy.CurrentX = picPlanet(Count).Left + (picPlanet(Count).Width / 2) - 25
  5691.         picGalaxy.CurrentY = picPlanet(Count).Top + picPlanet(Count).Height + 15
  5692.         picGalaxy.ForeColor = vbYellow
  5693.         picGalaxy.Print Str(Current + 1)
  5694.     ElseIf Planet(Count).Owner = Other Then
  5695.         picGalaxy.CurrentX = picPlanet(Count).Left + (picPlanet(Count).Width / 2) - 25
  5696.         picGalaxy.CurrentY = picPlanet(Count).Top + picPlanet(Count).Height + 15
  5697.         picGalaxy.ForeColor = vbRed
  5698.         picGalaxy.Print Str(Other + 1)
  5699.     End If
  5700. Next Count
  5701. End Sub
  5702. Public Sub UpdateAliens()
  5703. 'set alien planet troop levels
  5704. 'increase as game progresses
  5705. Randomize
  5706. Dim i
  5707. For i = 0 To 49
  5708.   If Planet(i).Owner = Alien Then
  5709.     Planet(i).Troops = Planet(i).Troops + Int(Rnd * (Int(TurnNumber / 4))) + 1
  5710.     'upper limit of troops tied to resources on planet
  5711.     Dim UpperLimit As Integer
  5712.     UpperLimit = Planet(i).Resources * 25
  5713.     If Planet(i).Troops > UpperLimit Then
  5714.         'vary amount +/- 5 troops
  5715.         Planet(i).Troops = UpperLimit + Int(Rnd * 10) - 5
  5716.         'MsgBox "resources = " + Str(Planet(i).Resources) + Chr(13) + "troops = " + Str(Planet(i).Troops), , Planet(i).Name
  5717.     End If
  5718.     'set mechs if enough troops
  5719.     If Planet(i).Troops > 50 Then
  5720.         Planet(i).AssaultTroops = Int(Rnd * 8) + 1
  5721.     ElseIf Planet(i).Troops > 30 Then
  5722.         Planet(i).AssaultTroops = Int(Rnd * 5) + 1
  5723.     ElseIf Planet(i).Troops > 20 Then
  5724.         Planet(i).AssaultTroops = Int(Rnd * 3) + 1
  5725.     End If
  5726.              
  5727.     SetCombatStrength (i)
  5728.   End If
  5729. Next i
  5730. End Sub
  5731. Public Sub LostInSpace()
  5732. 'count number of planets available for landing
  5733. 'if count is zero, tell player their ship is lost
  5734. 'then reinitialize the ship etc.
  5735. If Player(Current).Ship(0).Launched Then
  5736.     Dim Count As Integer
  5737.     Dim x1, y1, X2, Y2
  5738.     Dim a As Integer
  5739.     Dim b As Integer
  5740.     Dim Distance
  5741.     Dim RangeLow, RangeHigh
  5742.     Dim xpos, ypos, radius
  5743.     'set activeship to appropriate ship number
  5744.     activeship = 0
  5745.     'clear the board of any inrange settings
  5746.     Dim z
  5747.     For z = 0 To 49
  5748.         Planet(z).InRange = False
  5749.     Next z
  5750.     'Check for UltraWarp and set ranges
  5751.     If Player(Current).UltraWarpResearched Then
  5752.         'increased range
  5753.         RangeLow = Player(Current).Ship(0).WarpPosition * 250
  5754.         RangeHigh = RangeLow + 700
  5755.     ElseIf Player(Current).UltraWarpResearched = False Then
  5756.         'lower ranges
  5757.         RangeLow = Player(Current).Ship(0).WarpPosition * 250
  5758.         RangeHigh = RangeLow + 350
  5759.     End If
  5760.     'ship's starting position - originating planet
  5761.     x1 = Player(Current).Ship(0).CenterX
  5762.     y1 = Player(Current).Ship(0).CenterY
  5763.     'check distance from home planet to each other planet
  5764.     'if within the range, set planet's InRange to true
  5765.     For Count = 0 To 49
  5766.         X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  5767.         Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  5768.         a = Abs(x1 - X2)
  5769.         b = Abs(y1 - Y2)
  5770.         Distance = Int(Sqr(a ^ 2 + b ^ 2))
  5771.         If Distance >= RangeLow And Distance <= RangeHigh And picPlanet(Count).Visible Then
  5772.             'planet is within range - add to list
  5773.             NumPlanets1 = NumPlanets1 + 1
  5774.         End If
  5775.     Next Count
  5776.     NumPlanets1 = 999
  5777. End If
  5778. If Player(Current).Ship(1).Launched Then
  5779.     'set activeship to appropriate ship number
  5780.     activeship = 0
  5781.     'clear the board of any inrange settings
  5782.     For z = 0 To 49
  5783.         Planet(z).InRange = False
  5784.     Next z
  5785.     'Check for UltraWarp and set ranges
  5786.     If Player(Current).UltraWarpResearched Then
  5787.         'increased range
  5788.         RangeLow = Player(Current).Ship(1).WarpPosition * 250
  5789.         RangeHigh = RangeLow + 700
  5790.     ElseIf Player(Current).UltraWarpResearched = False Then
  5791.         'lower ranges
  5792.         RangeLow = Player(Current).Ship(1).WarpPosition * 250
  5793.         RangeHigh = RangeLow + 350
  5794.     End If
  5795.     'ship's starting position - originating planet
  5796.     x1 = Player(Current).Ship(1).CenterX
  5797.     y1 = Player(Current).Ship(1).CenterY
  5798.     'check distance from home planet to each other planet
  5799.     'if within the range, set planet's InRange to true
  5800.     For Count = 0 To 49
  5801.         X2 = picPlanet(Count).Left + (picPlanet(Count).Width / 2)
  5802.         Y2 = picPlanet(Count).Top + (picPlanet(Count).Height / 2)
  5803.         a = Abs(x1 - X2)
  5804.         b = Abs(y1 - Y2)
  5805.         Distance = Int(Sqr(a ^ 2 + b ^ 2))
  5806.         If Distance >= RangeLow And Distance <= RangeHigh And picPlanet(Count).Visible Then
  5807.             'planet is within range - add to list
  5808.             NumPlanets2 = NumPlanets2 + 1
  5809.         End If
  5810.     Next Count
  5811.     NumPlanets2 = 999
  5812. End If
  5813. 'MsgBox "Number of eligible planets:" + Str(NumPlanets1)
  5814. End Sub
  5815. Public Sub DrawGridLines()
  5816. 'draw grid lines
  5817. Dim x1, X2, x3, x4
  5818. Dim y1, Y2, y3, y4
  5819. Dim linecolor, lineheight, linewidth
  5820. linecolor = &H808080
  5821. lineheight = picGalaxy.ScaleHeight
  5822. linewidth = picGalaxy.ScaleWidth
  5823. 'vertical lines
  5824. x1 = picGalaxy.ScaleWidth / 5
  5825. picGalaxy.Line (x1, 0)-(x1, lineheight), linecolor
  5826. X2 = x1 * 2
  5827. picGalaxy.Line (X2, 0)-(X2, lineheight), linecolor
  5828. x3 = x1 * 3
  5829. picGalaxy.Line (x3, 0)-(x3, lineheight), linecolor
  5830. x4 = x1 * 4
  5831. picGalaxy.Line (x4, 0)-(x4, lineheight), linecolor
  5832. 'horizontal lines
  5833. y1 = picGalaxy.ScaleHeight / 5
  5834. picGalaxy.Line (0, y1)-(linewidth, y1), linecolor
  5835. Y2 = y1 * 2
  5836. picGalaxy.Line (0, Y2)-(linewidth, Y2), linecolor
  5837. y3 = y1 * 3
  5838. picGalaxy.Line (0, y3)-(linewidth, y3), linecolor
  5839. y4 = y1 * 4
  5840. picGalaxy.Line (0, y4)-(linewidth, y4), linecolor
  5841. End Sub
  5842. Public Sub EraseGridLines()
  5843. 'draw grid lines
  5844. Dim x1, X2, x3, x4
  5845. Dim y1, Y2, y3, y4
  5846. Dim lineheight, linewidth
  5847. lineheight = picGalaxy.ScaleHeight
  5848. linewidth = picGalaxy.ScaleWidth
  5849. 'vertical lines
  5850. x1 = picGalaxy.ScaleWidth / 5
  5851. picGalaxy.Line (x1, 0)-(x1, lineheight), vbBlack
  5852. X2 = x1 * 2
  5853. picGalaxy.Line (X2, 0)-(X2, lineheight), vbBlack
  5854. x3 = x1 * 3
  5855. picGalaxy.Line (x3, 0)-(x3, lineheight), vbBlack
  5856. x4 = x1 * 4
  5857. picGalaxy.Line (x4, 0)-(x4, lineheight), vbBlack
  5858. 'horizontal lines
  5859. y1 = picGalaxy.ScaleHeight / 5
  5860. picGalaxy.Line (0, y1)-(linewidth, y1), vbBlack
  5861. Y2 = y1 * 2
  5862. picGalaxy.Line (0, Y2)-(linewidth, Y2), vbBlack
  5863. y3 = y1 * 3
  5864. picGalaxy.Line (0, y3)-(linewidth, y3), vbBlack
  5865. y4 = y1 * 4
  5866. picGalaxy.Line (0, y4)-(linewidth, y4), vbBlack
  5867. End Sub
  5868. Public Sub AlienExpansion()
  5869. 'Alien Expansion procedure
  5870. '***once aliens planets have at least 20 troops, then look at the 3 planets on either side.
  5871. 'if they're neutral, there is a 5% + 1-TurnNumber chance of expanding
  5872. Dim X As Integer
  5873. Randomize
  5874. For X = 0 To 49
  5875.     If Planet(X).Owner = Alien And Planet(X).Troops > 20 Then
  5876.         'look at planets +/- 3 of the alien planet
  5877.         Dim CheckA As Integer
  5878.         Dim CheckZ As Integer
  5879.         Dim Result As Integer
  5880.         Dim Y As Integer
  5881.         Dim ChanceOfExpansion As Integer
  5882.         
  5883.         ChanceOfExpansion = 5 + (Int(Rnd * TurnNumber) + 1)
  5884.         
  5885.         CheckA = X - 3
  5886.         If CheckA < 0 Then CheckA = 0  'prevent error 9 - subscript out of range
  5887.         
  5888.         CheckZ = X + 3
  5889.         If CheckZ > 49 Then CheckZ = 49  'ditto for error 9
  5890.         
  5891.         For Y = CheckA To CheckZ
  5892.             If Planet(Y).Owner = Neutral Then
  5893.                 Result = Int(Rnd * 100) + 1
  5894.                 If Result <= ChanceOfExpansion Then
  5895.                     'aliens take planet
  5896.                     Dim Force As Integer        'how many aliens invade
  5897.                     Force = Int(Rnd * 5) + 5
  5898.                     Planet(Y).Owner = 3
  5899.                     Planet(Y).Troops = Force
  5900.                     Planet(X).Troops = Planet(X).Troops - Force
  5901.                     Exit Sub
  5902.                 End If
  5903.             End If
  5904.         Next Y
  5905.     End If
  5906. Next X
  5907. End Sub
  5908.